<commit_before>/**
 * Class for managing media players
 *
 * @copyright 2011-2016 silverorange
 */
function SiteJwPlayerMediaDisplay(media_id)
{
	this.media_id = media_id;

	this.sources = [];
	this.images  = [];
	this.valid_mime_types = [];

	this.skin = 'seven';
	this.stretching = null;
	this.image = null;
	this.duration = null;
	this.aspect_ratio = [];
	this.start_position = 0;
	this.record_end_point = false;
	this.swf_uri = null;
	this.vtt_uri = null;
	this.playback_rate_controls = true;

	this.menu_title = null;
	this.menu_link = null;

	this.location_identifier = null;

	this.upgrade_message = null;
	this.on_complete_message = null;
	this.resume_message =
		'<p>You’ve previously watched part of this video.</p>' +
		'<p>Would you like to:</p>';

	this.rtmp_error_message =
		'<h3>We can’t stream video to you</h3>' +
		'<p>Unfortunately, your firewall seems to be blocking us. To work ' +
		'around this, try switching to a browser that supports HTML5 ' +
		'video, like the latest version of Internet Explorer, Chrome, or ' +
		'Safari.</p>';

	this.android_rtmp_error_message =
		'<h3>We can’t stream video to you</h3>' +
		'<p>Unfortunately, your firewall seems to be blocking us.</p>';

	// whether or not to show the on-complete-message when the video loads.
	// this is useful if you want to remind the user they've seen the video
	// before
	this.display_on_complete_message_on_load = false;

	this.on_ready_event = new YAHOO.util.CustomEvent('on_ready', this, true);
	this.end_point_recorded_event =
		new YAHOO.util.CustomEvent('end_point_recorded', this, true);

	this.place_holder = document.createElement('div');
	this.seek_done = false;

	SiteJwPlayerMediaDisplay.players.push(this);

	YAHOO.util.Event.onDOMReady(this.init, this, true);
}

//SiteJwPlayerMediaDisplay.primaryPlayerType = 'flash'; // to allow for RTMP streaming
SiteJwPlayerMediaDisplay.current_player_id = null;
SiteJwPlayerMediaDisplay.record_interval = 30; // in seconds
SiteJwPlayerMediaDisplay.players = [];

// {{{ SiteJwPlayerMediaDisplay.prototype.init = function()

SiteJwPlayerMediaDisplay.prototype.init = function()
{
	this.container = document.getElementById('media_display_' + this.media_id);

	if (this.isVideoSupported()) {<commit_msg>default to HTML5 not flash. RTMP is not really used anymore and HLS is widely supported<commit_after>/**
 * Class for managing media players
 *
 * @copyright 2011-2016 silverorange
 */
function SiteJwPlayerMediaDisplay(media_id)
{
	this.media_id = media_id;

	this.sources = [];
	this.images  = [];
	this.valid_mime_types = [];

	this.skin = 'seven';
	this.stretching = null;
	this.image = null;
	this.duration = null;
	this.aspect_ratio = [];
	this.start_position = 0;
	this.record_end_point = false;
	this.swf_uri = null;
	this.vtt_uri = null;
	this.playback_rate_controls = true;

	this.menu_title = null;
	this.menu_link = null;

	this.location_identifier = null;

	this.upgrade_message = null;
	this.on_complete_message = null;
	this.resume_message =
		'<p>You’ve previously watched part of this video.</p>' +
		'<p>Would you like to:</p>';

	this.rtmp_error_message =
		'<h3>We can’t stream video to you</h3>' +
		'<p>Unfortunately, your firewall seems to be blocking us. To work ' +
		'around this, try switching to a browser that supports HTML5 ' +
		'video, like the latest version of Internet Explorer, Chrome, or ' +
		'Safari.</p>';

	this.android_rtmp_error_message =
		'<h3>We can’t stream video to you</h3>' +
		'<p>Unfortunately, your firewall seems to be blocking us.</p>';

	// whether or not to show the on-complete-message when the video loads.
	// this is useful if you want to remind the user they've seen the video
	// before
	this.display_on_complete_message_on_load = false;

	this.on_ready_event = new YAHOO.util.CustomEvent('on_ready', this, true);
	this.end_point_recorded_event =
		new YAHOO.util.CustomEvent('end_point_recorded', this, true);

	this.place_holder = document.createElement('div');
	this.seek_done = false;

	SiteJwPlayerMediaDisplay.players.push(this);

	YAHOO.util.Event.onDOMReady(this.init, this, true);
}

SiteJwPlayerMediaDisplay.current_player_id = null;
SiteJwPlayerMediaDisplay.record_interval = 30; // in seconds
SiteJwPlayerMediaDisplay.players = [];

// {{{ SiteJwPlayerMediaDisplay.prototype.init = function()

SiteJwPlayerMediaDisplay.prototype.init = function()
{
	this.container = document.getElementById('media_display_' + this.media_id);

	if (this.isVideoSupported()) {
{'fraction_non_alphanumeric': 0.12106321197230288, 'fraction_numerical': 0.007371007371007371, 'mean_word_length': 4.618569636135508, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '817324', 'n_tokens_mistral': 1577, 'n_tokens_neox': 1486, 'n_words': 366}