<commit_before>Ui.Element.extend('Ui.Video', 
/**@lends Ui.Video#*/
{
	src: undefined,
	oggSrc: undefined,
	mp4Src: undefined,
	webmSrc: undefined,
	loaddone: false,
	videoDrawing: undefined,
	canplaythrough: false,
	// possible values [initial|playing|paused|buffering|error]
	state: 'initial',

	/**
	*	@constructs
	*	@class
	*	@extends Ui.Element
	*/
	constructor: function(config) {
		this.addEvents('ready', 'ended', 'timeupdate', 'bufferingupdate', 'statechange', 'error');
		this.connect(this, 'unload', this.onVideoUnload);
		if((config.oggSrc != undefined) || (config.mp4Src != undefined) || (config.webmSrc != undefined)) {
			if((config.oggSrc != undefined) && (Ui.Video.supportOgg))
				this.setSrc(config.oggSrc);
			else if((config.mp4Src != undefined) && (Ui.Video.supportMp4))
				this.setSrc(config.mp4Src);
			else if((config.webmSrc != undefined) && (Ui.Video.supportWebm))
				this.setSrc(config.webmSrc);
			delete(config.oggSrc);
			delete(config.mp4Src);
			delete(config.webmSrc);
		}
	},

	/**
	* Set the file URL for the current video element
	*/
	setSrc: function(src) {
		this.canplaythrough = false;
		this.state = 'initial';
		this.src = src;
		this.videoDrawing.setAttribute('src', src);
		try {
			this.videoDrawing.load();
		} catch(e) {}
	},

	/**<commit_msg>add "poster" support for Ui.Video<commit_after>Ui.Element.extend('Ui.Video', 
/**@lends Ui.Video#*/
{
	src: undefined,
	poster: undefined,
	oggSrc: undefined,
	mp4Src: undefined,
	webmSrc: undefined,
	loaddone: false,
	videoDrawing: undefined,
	canplaythrough: false,
	// possible values [initial|playing|paused|buffering|error]
	state: 'initial',

	/**
	*	@constructs
	*	@class
	*	@extends Ui.Element
	*/
	constructor: function(config) {
		this.addEvents('ready', 'ended', 'timeupdate', 'bufferingupdate', 'statechange', 'error');
		this.connect(this, 'unload', this.onVideoUnload);
		if((config.oggSrc != undefined) || (config.mp4Src != undefined) || (config.webmSrc != undefined)) {
			if((config.oggSrc != undefined) && (Ui.Video.supportOgg))
				this.setSrc(config.oggSrc);
			else if((config.mp4Src != undefined) && (Ui.Video.supportMp4))
				this.setSrc(config.mp4Src);
			else if((config.webmSrc != undefined) && (Ui.Video.supportWebm))
				this.setSrc(config.webmSrc);
			delete(config.oggSrc);
			delete(config.mp4Src);
			delete(config.webmSrc);
		}
	},

	/**
	* Set the file URL for the current video element
	*/
	setSrc: function(src) {
		this.canplaythrough = false;
		this.state = 'initial';
		this.src = src;
		this.videoDrawing.setAttribute('src', src);
		try {
			this.videoDrawing.load();
		} catch(e) {}
	},
	
	/**
	* Set the file URL for the current video poster (preview)
	*/
	setPoster: function(src) {
		this.poster = src;
		this.videoDrawing.setAttribute('poster', src);
	},

	/**
{'fraction_non_alphanumeric': 0.1729807005003574, 'fraction_numerical': 0.004288777698355968, 'mean_word_length': 4.331428571428572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3548711', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1002, 'n_words': 186}