<commit_before>/**
 * Used to Overlay images and take over player controls
 *
 *  extends EmbedPlayerNative object image overlay support
 */

( function( mw, $ ) {"use strict";

	mw.EmbedPlayerImageOverlay = {

		instanceOf: 'ImageOverlay',

		// If the player is "ready to play"
		playerReady : true,

		// Pause time used to track player time between pauses
		lastPauseTime: 0,

		// currentTime updated via internal clockStartTime var
		currentTime:0,

		// StartOffset support seeking into the virtual player
		startOffset:0,

		// The local clock used to emulate playback time
		clockStartTime: 0,
		
		// A flag to set if image is loaded
		imageLoaded: false,

		/**
		 * Build the player interface:
		 */
		init: function(){
			// Check if features are already updated:
			if( this['native_instaceOf'] == 'Native' ){
				return ;
			}
			// inherit mw.EmbedPlayerNative (
			for( var i in mw.EmbedPlayerNative ){
				if( typeof mw.EmbedPlayerImageOverlay[ i ] != 'undefined' ){
					this['native_' + i ] = mw.EmbedPlayerNative[i];
				} else {
					this[ i ] = mw.EmbedPlayerNative[i];
				}
			}
		},

		/**
		 * When on playback method switch remove imageOverlay
		 * @param {function} callback
		 */
		updatePlaybackInterface: function( callback ){
			mw.log( 'EmbedPlayerImageOverlay:: updatePlaybackInterface: ' + $(this).siblings( '.playerPoster' ).length );
			// Clear imageOverlay sibling:
			// Restore the video element on screen position:
			$( this.getPlayerElement() ).css( 'left', 0 );
			// Call normal parent updatePlaybackInterface
			this.parent_updatePlaybackInterface( callback );
		},

		/**
		 * The method called to "show the player"
		 * For image overlay we want to:
		 * Set black video urls for player source
		 * Add an image overlay
		 */
		updatePosterHTML: function(){
			var vid = this.getPlayerElement();
			$( vid ).empty();

			// embed the image:
			this.embedPlayerHTML();
		},

		/**<commit_msg>do not remove poster for image entries<commit_after>/**
 * Used to Overlay images and take over player controls
 *
 *  extends EmbedPlayerNative object image overlay support
 */

( function( mw, $ ) {"use strict";

	mw.EmbedPlayerImageOverlay = {

		instanceOf: 'ImageOverlay',

		// If the player is "ready to play"
		playerReady : true,

		// Pause time used to track player time between pauses
		lastPauseTime: 0,

		// currentTime updated via internal clockStartTime var
		currentTime:0,

		// StartOffset support seeking into the virtual player
		startOffset:0,

		// The local clock used to emulate playback time
		clockStartTime: 0,
		
		// A flag to set if image is loaded
		imageLoaded: false,

		/**
		 * Build the player interface:
		 */
		init: function(){
			// Check if features are already updated:
			if( this['native_instaceOf'] == 'Native' ){
				return ;
			}
			// inherit mw.EmbedPlayerNative (
			for( var i in mw.EmbedPlayerNative ){
				if( typeof mw.EmbedPlayerImageOverlay[ i ] != 'undefined' ){
					this['native_' + i ] = mw.EmbedPlayerNative[i];
				} else {
					this[ i ] = mw.EmbedPlayerNative[i];
				}
			}
		},

		/**
		 * When on playback method switch remove imageOverlay
		 * @param {function} callback
		 */
		updatePlaybackInterface: function( callback ){
			mw.log( 'EmbedPlayerImageOverlay:: updatePlaybackInterface: ' + $(this).siblings( '.playerPoster' ).length );
			// Clear imageOverlay sibling:
			// Restore the video element on screen position:
			$( this.getPlayerElement() ).css( 'left', 0 );
			// Call normal parent updatePlaybackInterface
			this.parent_updatePlaybackInterface( callback );
		},

		/**
		 * The method called to "show the player"
		 * For image overlay we want to:
		 * Set black video urls for player source
		 * Add an image overlay
		 */
		updatePosterHTML: function(){
			var vid = this.getPlayerElement();
			$( vid ).empty();

			// embed the image:
			this.embedPlayerHTML();
		},

		removePoster: function() {},

		/**
{'fraction_non_alphanumeric': 0.11424219345011424, 'fraction_numerical': 0.002538715410002539, 'mean_word_length': 3.10844629822732, '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': '1887611', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1137, 'n_words': 382}