/external/popcorn/popcorn-complete.js
JavaScript | 9098 lines | 5417 code | 1526 blank | 2155 comment | 962 complexity | 05596acbe4aff6871a9872129a6b656b MD5 | raw file
Possible License(s): Apache-2.0
Large files files are truncated, but you can click here to view the full file
- /*
- * popcorn.js version 0.7
- * http://popcornjs.org
- *
- * Copyright 2011, Mozilla Foundation
- * Licensed under the MIT license
- */
- (function(global, document) {
- // Cache refs to speed up calls to native utils
-
- var
-
- AP = Array.prototype,
- OP = Object.prototype,
-
- forEach = AP.forEach,
- slice = AP.slice,
- hasOwn = OP.hasOwnProperty,
- toString = OP.toString,
- // ID string matching
- rIdExp = /^(#([\w\-\_\.]+))$/,
- // Ready fn cache
- readyStack = [],
- readyBound = false,
- readyFired = false,
- // Non-public internal data object
- internal = {
- events: {
- hash: {},
- apis: {}
- }
- },
- // Declare constructor
- // Returns an instance object.
- Popcorn = function( entity, options ) {
- // Return new Popcorn object
- return new Popcorn.p.init( entity, options || null );
- };
- // Instance caching
- Popcorn.instances = [];
- Popcorn.instanceIds = {};
- Popcorn.removeInstance = function( instance ) {
- // If called prior to any instances being created
- // Return early to avoid splicing on nothing
- if ( !Popcorn.instances.length ) {
- return;
- }
- // Remove instance from Popcorn.instances
- Popcorn.instances.splice( Popcorn.instanceIds[ instance.id ], 1 );
- // Delete the instance id key
- delete Popcorn.instanceIds[ instance.id ];
- // Return current modified instances
- return Popcorn.instances;
- };
- // Addes a Popcorn instance to the Popcorn instance array
- Popcorn.addInstance = function( instance ) {
- var instanceLen = Popcorn.instances.length,
- instanceId = instance.media.id && instance.media.id;
- // If the media element has its own `id` use it, otherwise provide one
- // Ensure that instances have unique ids and unique entries
- // Uses `in` operator to avoid false positives on 0
- instance.id = !( instanceId in Popcorn.instanceIds ) && instanceId ||
- "__popcorn" + instanceLen;
- // Create a reference entry for this instance
- Popcorn.instanceIds[ instance.id ] = instanceLen;
- // Add this instance to the cache
- Popcorn.instances.push( instance );
- // Return the current modified instances
- return Popcorn.instances;
- };
- // Request Popcorn object instance by id
- Popcorn.getInstanceById = function( id ) {
- return Popcorn.instances[ Popcorn.instanceIds[ id ] ];
- };
- // Remove Popcorn object instance by id
- Popcorn.removeInstanceById = function( id ) {
- return Popcorn.removeInstance( Popcorn.instances[ Popcorn.instanceIds[ id ] ] );
- };
- // Declare a shortcut (Popcorn.p) to and a definition of
- // the new prototype for our Popcorn constructor
- Popcorn.p = Popcorn.prototype = {
- init: function( entity, options ) {
- var matches;
- // Supports Popcorn(function () { /../ })
- // Originally proposed by Daniel Brooks
- if ( typeof entity === "function" ) {
- // If document ready has already fired
- if ( document.readyState === "interactive" || document.readyState === "complete" ) {
- entity( document, Popcorn );
- return;
- }
- // Add `entity` fn to ready stack
- readyStack.push( entity );
- // This process should happen once per page load
- if ( !readyBound ) {
- // set readyBound flag
- readyBound = true;
- var DOMContentLoaded = function() {
- readyFired = true;
- // Remove global DOM ready listener
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- // Execute all ready function in the stack
- for ( var i = 0, readyStackLength = readyStack.length; i < readyStackLength; i++ ) {
- readyStack[ i ].call( document, Popcorn );
- }
- // GC readyStack
- readyStack = null;
- };
- // Register global DOM ready listener
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- }
- return;
- }
- // Check if entity is a valid string id
- matches = rIdExp.exec( entity );
- // Get media element by id or object reference
- this.media = matches && matches.length && matches[ 2 ] ?
- document.getElementById( matches[ 2 ] ) :
- entity;
- // Create an audio or video element property reference
- this[ ( this.media.nodeName && this.media.nodeName.toLowerCase() ) || "video" ] = this.media;
- // Register new instance
- Popcorn.addInstance( this );
- this.options = options || {};
- this.data = {
- // Allows disabling a plugin per instance
- disabled: [],
- // Stores DOM event queues by type
- events: {},
- // Stores Special event hooks data
- hooks: {},
- // Store track event history data
- history: [],
- // Store track event object references by trackId
- trackRefs: {},
- // Playback track event queues
- trackEvents: {
- byStart: [{
- start: -1,
- end: -1
- }],
- byEnd: [{
- start: -1,
- end: -1
- }],
- startIndex: 0,
- endIndex: 0,
- previousUpdateTime: 0
- }
- };
- // Wrap true ready check
- var isReady = function( that ) {
- if ( that.media.readyState >= 2 ) {
- // Adding padding to the front and end of the arrays
- // this is so we do not fall off either end
- var duration = that.media.duration,
- // Check for no duration info (NaN)
- videoDurationPlus = duration != duration ? Number.MAX_VALUE : duration + 1;
- Popcorn.addTrackEvent( that, {
- start: videoDurationPlus,
- end: videoDurationPlus
- });
- that.media.addEventListener( "timeupdate", function( event ) {
- Popcorn.timeUpdate( that, event );
- }, false );
- } else {
- global.setTimeout(function() {
- isReady( that );
- }, 1 );
- }
- };
- isReady( this );
- return this;
- }
- };
- // Extend constructor prototype to instance prototype
- // Allows chaining methods to instances
- Popcorn.p.init.prototype = Popcorn.p;
- Popcorn.forEach = function( obj, fn, context ) {
- if ( !obj || !fn ) {
- return {};
- }
- context = context || this;
- var key, len;
- // Use native whenever possible
- if ( forEach && obj.forEach === forEach ) {
- return obj.forEach( fn, context );
- }
- if ( toString.call( obj ) === "[object NodeList]" ) {
- for ( key = 0, len = obj.length; key < len; key++ ) {
- fn.call( context, obj[ key ], key, obj );
- }
- return obj;
- }
- for ( key in obj ) {
- if ( hasOwn.call( obj, key ) ) {
- fn.call( context, obj[ key ], key, obj );
- }
- }
- return obj;
- };
- Popcorn.extend = function( obj ) {
- var dest = obj, src = slice.call( arguments, 1 );
- Popcorn.forEach( src, function( copy ) {
- for ( var prop in copy ) {
- dest[ prop ] = copy[ prop ];
- }
- });
- return dest;
- };
- // A Few reusable utils, memoized onto Popcorn
- Popcorn.extend( Popcorn, {
- error: function( msg ) {
- throw new Error( msg );
- },
- guid: function( prefix ) {
- Popcorn.guid.counter++;
- return ( prefix ? prefix : "" ) + ( +new Date() + Popcorn.guid.counter );
- },
- sizeOf: function( obj ) {
- var size = 0;
- for ( var prop in obj ) {
- size++;
- }
- return size;
- },
- isArray: Array.isArray || function( array ) {
- return toString.call( array ) === "[object Array]";
- },
- nop: function() {},
- position: function( elem ) {
- var clientRect = elem.getBoundingClientRect(),
- bounds = {},
- doc = elem.ownerDocument,
- docElem = document.documentElement,
- body = document.body,
- clientTop, clientLeft, scrollTop, scrollLeft, top, left;
- // Determine correct clientTop/Left
- clientTop = docElem.clientTop || body.clientTop || 0;
- clientLeft = docElem.clientLeft || body.clientLeft || 0;
- // Determine correct scrollTop/Left
- scrollTop = ( global.pageYOffset && docElem.scrollTop || body.scrollTop );
- scrollLeft = ( global.pageXOffset && docElem.scrollLeft || body.scrollLeft );
- // Temp top/left
- top = Math.ceil( clientRect.top + scrollTop - clientTop );
- left = Math.ceil( clientRect.left + scrollLeft - clientLeft );
- for ( var p in clientRect ) {
- bounds[ p ] = Math.round( clientRect[ p ] );
- }
- return Popcorn.extend({}, bounds, { top: top, left: left });
- },
- disable: function( instance, plugin ) {
- var disabled = instance.data.disabled;
-
- if ( disabled.indexOf( plugin ) === -1 ) {
- disabled.push( plugin );
- }
- return instance;
- },
- enable: function( instance, plugin ) {
- var disabled = instance.data.disabled,
- index = disabled.indexOf( plugin );
- if ( index > -1 ) {
- disabled.splice( index, 1 );
- }
- return instance;
- }
- });
- // Memoized GUID Counter
- Popcorn.guid.counter = 1;
- // Factory to implement getters, setters and controllers
- // as Popcorn instance methods. The IIFE will create and return
- // an object with defined methods
- Popcorn.extend(Popcorn.p, (function() {
- var methods = "load play pause currentTime playbackRate mute volume duration",
- ret = {};
- // Build methods, store in object that is returned and passed to extend
- Popcorn.forEach( methods.split( /\s+/g ), function( name ) {
- ret[ name ] = function( arg ) {
- if ( typeof this.media[ name ] === "function" ) {
- this.media[ name ]();
- return this;
- }
- if ( arg !== false && arg !== null && typeof arg !== "undefined" ) {
- this.media[ name ] = arg;
- return this;
- }
- return this.media[ name ];
- };
- });
- return ret;
- })()
- );
- Popcorn.forEach( "enable disable".split(" "), function( method ) {
- Popcorn.p[ method ] = function( plugin ) {
- return Popcorn[ method ]( this, plugin );
- };
- });
- Popcorn.extend(Popcorn.p, {
- // Rounded currentTime
- roundTime: function() {
- return -~this.media.currentTime;
- },
- // Attach an event to a single point in time
- exec: function( time, fn ) {
- // Creating a one second track event with an empty end
- Popcorn.addTrackEvent( this, {
- start: time,
- end: time + 1,
- _running: false,
- _natives: {
- start: fn || Popcorn.nop,
- end: Popcorn.nop,
- type: "exec"
- }
- });
- return this;
- },
- // Get the client bounding box of an instance element
- position: function() {
- return Popcorn.position( this.media );
- },
- // Toggle a plugin's playback behaviour (on or off) per instance
- toggle: function( plugin ) {
- return Popcorn[ this.data.disabled.indexOf( plugin ) > -1 ? "enable" : "disable" ]( this, plugin );
- },
- // Set default values for plugin options objects per instance
- defaults: function( plugin, defaults ) {
- // If an array of default configurations is provided,
- // iterate and apply each to this instance
- if ( Popcorn.isArray( plugin ) ) {
- Popcorn.forEach( plugin, function( obj ) {
- for ( var name in obj ) {
- this.defaults( name, obj[ name ] );
- }
- }, this );
- return this;
- }
- if ( !this.options.defaults ) {
- this.options.defaults = {};
- }
- if ( !this.options.defaults[ plugin ] ) {
- this.options.defaults[ plugin ] = {};
- }
- Popcorn.extend( this.options.defaults[ plugin ], defaults );
- return this;
- }
- });
- Popcorn.Events = {
- UIEvents: "blur focus focusin focusout load resize scroll unload",
- MouseEvents: "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",
- Events: "loadstart progress suspend emptied stalled play pause " +
- "loadedmetadata loadeddata waiting playing canplay canplaythrough " +
- "seeking seeked timeupdate ended ratechange durationchange volumechange"
- };
- Popcorn.Events.Natives = Popcorn.Events.UIEvents + " " +
- Popcorn.Events.MouseEvents + " " +
- Popcorn.Events.Events;
- internal.events.apiTypes = [ "UIEvents", "MouseEvents", "Events" ];
- // Privately compile events table at load time
- (function( events, data ) {
- var apis = internal.events.apiTypes,
- eventsList = events.Natives.split( /\s+/g ),
- idx = 0, len = eventsList.length, prop;
- for( ; idx < len; idx++ ) {
- data.hash[ eventsList[idx] ] = true;
- }
- apis.forEach(function( val, idx ) {
- data.apis[ val ] = {};
- var apiEvents = events[ val ].split( /\s+/g ),
- len = apiEvents.length,
- k = 0;
- for ( ; k < len; k++ ) {
- data.apis[ val ][ apiEvents[ k ] ] = true;
- }
- });
- })( Popcorn.Events, internal.events );
- Popcorn.events = {
- isNative: function( type ) {
- return !!internal.events.hash[ type ];
- },
- getInterface: function( type ) {
- if ( !Popcorn.events.isNative( type ) ) {
- return false;
- }
- var eventApi = internal.events,
- apis = eventApi.apiTypes,
- apihash = eventApi.apis,
- idx = 0, len = apis.length, api, tmp;
- for ( ; idx < len; idx++ ) {
- tmp = apis[ idx ];
-
- if ( apihash[ tmp ][ type ] ) {
- api = tmp;
- break;
- }
- }
- return api;
- },
- // Compile all native events to single array
- all: Popcorn.Events.Natives.split( /\s+/g ),
- // Defines all Event handling static functions
- fn: {
- trigger: function( type, data ) {
- var eventInterface, evt;
- // setup checks for custom event system
- if ( this.data.events[ type ] && Popcorn.sizeOf( this.data.events[ type ] ) ) {
- eventInterface = Popcorn.events.getInterface( type );
- if ( eventInterface ) {
- evt = document.createEvent( eventInterface );
- evt.initEvent( type, true, true, global, 1 );
- this.media.dispatchEvent( evt );
- return this;
- }
- // Custom events
- Popcorn.forEach( this.data.events[ type ], function( obj, key ) {
- obj.call( this, data );
- }, this );
- }
- return this;
- },
- listen: function( type, fn ) {
- var self = this,
- hasEvents = true,
- eventHook = Popcorn.events.hooks[ type ],
- origType = type,
- tmp;
- if ( !this.data.events[ type ] ) {
- this.data.events[ type ] = {};
- hasEvents = false;
- }
- // Check and setup event hooks
- if ( eventHook ) {
- // Execute hook add method if defined
- if ( eventHook.add ) {
- eventHook.add.call( this );
- }
- // Reassign event type to our piggyback event type if defined
- if ( eventHook.bind ) {
- type = eventHook.bind;
- }
- // Reassign handler if defined
- if ( eventHook.handler ) {
- tmp = fn;
- fn = function wrapper( event ) {
- eventHook.handler.call( self, event, tmp );
- };
- }
- // assume the piggy back event is registered
- hasEvents = true;
- // Setup event registry entry
- if ( !this.data.events[ type ] ) {
- this.data.events[ type ] = {};
- // Toggle if the previous assumption was untrue
- hasEvents = false;
- }
- }
- // Register event and handler
- this.data.events[ type ][ fn.name || ( fn.toString() + Popcorn.guid() ) ] = fn;
- // only attach one event of any type
- if ( !hasEvents && Popcorn.events.all.indexOf( type ) > -1 ) {
- this.media.addEventListener( type, function( event ) {
- Popcorn.forEach( self.data.events[ type ], function( obj, key ) {
- if ( typeof obj === "function" ) {
- obj.call( self, event );
- }
- });
- }, false);
- }
- return this;
- },
- unlisten: function( type, fn ) {
- if ( this.data.events[ type ] && this.data.events[ type ][ fn ] ) {
- delete this.data.events[ type ][ fn ];
- return this;
- }
- this.data.events[ type ] = null;
- return this;
- }
- },
- hooks: {
- canplayall: {
- bind: "canplaythrough",
- add: function() {
- this.data.hooks.canplayall = {
- fired: false
- };
- },
- // declare special handling instructions
- handler: function canplayall( event, callback ) {
- if ( !this.data.hooks.canplayall.fired ) {
- // trigger original user callback once
- callback.call( this, event );
- this.data.hooks.canplayall.fired = true;
- }
- }
- }
- }
- };
- // Extend Popcorn.events.fns (listen, unlisten, trigger) to all Popcorn instances
- Popcorn.forEach( [ "trigger", "listen", "unlisten" ], function( key ) {
- Popcorn.p[ key ] = Popcorn.events.fn[ key ];
- });
- // Protected API methods
- Popcorn.protect = {
- natives: "load play pause currentTime playbackRate mute volume duration removePlugin roundTime trigger listen unlisten exec".toLowerCase().split( /\s+/ )
- };
- // Internal Only - Adds track events to the instance object
- Popcorn.addTrackEvent = function( obj, track ) {
- // Determine if this track has default options set for it
- // If so, apply them to the track object
- if ( track && track._natives && track._natives.type &&
- ( obj.options.defaults && obj.options.defaults[ track._natives.type ] ) ) {
- track = Popcorn.extend( {}, obj.options.defaults[ track._natives.type ], track );
- }
- if ( track._natives ) {
- // Supports user defined track event id
- track._id = !track.id ? Popcorn.guid( track._natives.type ) : track.id;
- // Push track event ids into the history
- obj.data.history.push( track._id );
- }
- track.start = Popcorn.util.toSeconds( track.start, obj.options.framerate );
- track.end = Popcorn.util.toSeconds( track.end, obj.options.framerate );
- // Store this definition in an array sorted by times
- var byStart = obj.data.trackEvents.byStart,
- byEnd = obj.data.trackEvents.byEnd,
- idx;
- for ( idx = byStart.length - 1; idx >= 0; idx-- ) {
- if ( track.start >= byStart[ idx ].start ) {
- byStart.splice( idx + 1, 0, track );
- break;
- }
- }
- for ( idx = byEnd.length - 1; idx >= 0; idx-- ) {
- if ( track.end > byEnd[ idx ].end ) {
- byEnd.splice( idx + 1, 0, track );
- break;
- }
- }
- if ( track.start <= obj.media.currentTime && track.end >= obj.media.currentTime ) {
- track.startIndex = idx + 1;
- }
- if ( obj.media.currentTime >= track.end ) {
- track.startIndex = idx + 1;
- }
- // Store references to user added trackevents in ref table
- if ( track._id ) {
- Popcorn.addTrackEvent.ref( obj, track );
- }
- Popcorn.timeUpdate( obj, null );
- };
- // Internal Only - Adds track event references to the instance object's trackRefs hash table
- Popcorn.addTrackEvent.ref = function( obj, track ) {
- obj.data.trackRefs[ track._id ] = track;
- return obj;
- };
- Popcorn.removeTrackEvent = function( obj, trackId ) {
- var historyLen = obj.data.history.length,
- indexWasAt = 0,
- byStart = [],
- byEnd = [],
- history = [];
- Popcorn.forEach( obj.data.trackEvents.byStart, function( o, i, context ) {
- // Preserve the original start/end trackEvents
- if ( !o._id ) {
- byStart.push( obj.data.trackEvents.byStart[i] );
- byEnd.push( obj.data.trackEvents.byEnd[i] );
- }
- // Filter for user track events (vs system track events)
- if ( o._id ) {
- // Filter for the trackevent to remove
- if ( o._id !== trackId ) {
- byStart.push( obj.data.trackEvents.byStart[i] );
- byEnd.push( obj.data.trackEvents.byEnd[i] );
- }
- // Capture the position of the track being removed.
- if ( o._id === trackId ) {
- indexWasAt = i;
- o._natives._teardown && o._natives._teardown.call( obj, o );
- }
- }
- });
- // Update
- if ( indexWasAt <= obj.data.trackEvents.startIndex ) {
- obj.data.trackEvents.startIndex--;
- }
- if ( indexWasAt <= obj.data.trackEvents.endIndex ) {
- obj.data.trackEvents.endIndex--;
- }
- obj.data.trackEvents.byStart = byStart;
- obj.data.trackEvents.byEnd = byEnd;
- for ( var i = 0; i < historyLen; i++ ) {
- if ( obj.data.history[ i ] !== trackId ) {
- history.push( obj.data.history[ i ] );
- }
- }
- // Update ordered history array
- obj.data.history = history;
- // Update track event references
- Popcorn.removeTrackEvent.ref( obj, trackId );
- };
- // Internal Only - Removes track event references from instance object's trackRefs hash table
- Popcorn.removeTrackEvent.ref = function( obj, trackId ) {
- delete obj.data.trackRefs[ trackId ];
- return obj;
- };
- // Return an array of track events bound to this instance object
- Popcorn.getTrackEvents = function( obj ) {
- var trackevents = [],
- refs = obj.data.trackEvents.byStart,
- length = refs.length,
- idx = 0,
- ref;
- for ( ; idx < length; idx++ ) {
- ref = refs[ idx ];
- // Return only user attributed track event references
- if ( ref._id ) {
- trackevents.push( ref );
- }
- }
- return trackevents;
- };
- // Internal Only - Returns an instance object's trackRefs hash table
- Popcorn.getTrackEvents.ref = function( obj ) {
- return obj.data.trackRefs;
- };
- // Return a single track event bound to this instance object
- Popcorn.getTrackEvent = function( obj, trackId ) {
- return obj.data.trackRefs[ trackId ];
- };
- // Internal Only - Returns an instance object's track reference by track id
- Popcorn.getTrackEvent.ref = function( obj, trackId ) {
- return obj.data.trackRefs[ trackId ];
- };
- Popcorn.getLastTrackEventId = function( obj ) {
- return obj.data.history[ obj.data.history.length - 1 ];
- };
- Popcorn.timeUpdate = function( that, event ) {
- var currentTime = that.media.currentTime,
- previousTime = that.data.trackEvents.previousUpdateTime,
- tracks = that.data.trackEvents,
- tracksByEnd = tracks.byEnd,
- tracksByStart = tracks.byStart,
- checkTrackEvents = function() {
- while ( tracksByEnd[ tracks.endIndex ] && tracksByEnd[ tracks.endIndex ].end <= currentTime ) {
- // If plugin does not exist on this instance, remove it
- if ( !tracksByEnd[ tracks.endIndex ]._natives || !!that[ tracksByEnd[ tracks.endIndex ]._natives.type ] ) {
- if ( tracksByEnd[ tracks.endIndex ]._running === true ) {
- tracksByEnd[ tracks.endIndex ]._running = false;
- tracksByEnd[ tracks.endIndex ]._natives.end.call( that, event, tracksByEnd[ tracks.endIndex ] );
- }
- tracks.endIndex++;
- } else {
- // remove track event
- Popcorn.removeTrackEvent( that, tracksByEnd[ tracks.endIndex ]._id );
- return;
- }
- }
- while ( tracksByStart[ tracks.startIndex ] && tracksByStart[ tracks.startIndex ].start <= currentTime ) {
- // If plugin does not exist on this instance, remove it
- if ( !tracksByStart[ tracks.startIndex ]._natives || !!that[ tracksByStart[ tracks.startIndex ]._natives.type ] ) {
- if ( tracksByStart[ tracks.startIndex ].end > currentTime &&
- tracksByStart[ tracks.startIndex ]._running === false &&
- that.data.disabled.indexOf( tracksByStart[ tracks.startIndex ]._natives.type ) === -1 ) {
- tracksByStart[ tracks.startIndex ]._running = true;
- tracksByStart[ tracks.startIndex ]._natives.start.call( that, event, tracksByStart[ tracks.startIndex ] );
- }
- tracks.startIndex++;
- } else {
- // remove track event
- Popcorn.removeTrackEvent( that, tracksByStart[ tracks.startIndex ]._id );
- return;
- }
- }
- }
- // Playbar advancing
- if ( previousTime < currentTime ) {
- checkTrackEvents();
- // Playbar receding
- } else if ( previousTime > currentTime ) {
- while ( tracksByStart[ tracks.startIndex ] && tracksByStart[ tracks.startIndex ].start > currentTime ) {
- // if plugin does not exist on this instance, remove it
- if ( !tracksByStart[ tracks.startIndex ]._natives || !!that[ tracksByStart[ tracks.startIndex ]._natives.type ] ) {
- if ( tracksByStart[ tracks.startIndex ]._running === true ) {
- tracksByStart[ tracks.startIndex ]._running = false;
- tracksByStart[ tracks.startIndex ]._natives.end.call( that, event, tracksByStart[ tracks.startIndex ] );
- }
- tracks.startIndex--;
- } else {
- // remove track event
- Popcorn.removeTrackEvent( that, tracksByStart[ tracks.startIndex ]._id );
- return;
- }
- }
- while ( tracksByEnd[ tracks.endIndex ] && tracksByEnd[ tracks.endIndex ].end > currentTime ) {
- // if plugin does not exist on this instance, remove it
- if ( !tracksByEnd[ tracks.endIndex ]._natives || !!that[ tracksByEnd[ tracks.endIndex ]._natives.type ] ) {
- if ( tracksByEnd[ tracks.endIndex ].start <= currentTime &&
- tracksByEnd[ tracks.endIndex ]._running === false &&
- that.data.disabled.indexOf( tracksByEnd[ tracks.endIndex ]._natives.type ) === -1 ) {
- tracksByEnd[ tracks.endIndex ]._running = true;
- tracksByEnd[ tracks.endIndex ]._natives.start.call( that, event, tracksByEnd[tracks.endIndex] );
- }
- tracks.endIndex--;
- } else {
- // remove track event
- Popcorn.removeTrackEvent( that, tracksByEnd[ tracks.endIndex ]._id );
- return;
- }
- }
- // time bar is not moving ( video is paused )
- } else if ( previousTime === currentTime ) {
-
- checkTrackEvents();
- }
- tracks.previousUpdateTime = currentTime;
- };
- // Map and Extend TrackEvent functions to all Popcorn instances
- Popcorn.extend( Popcorn.p, {
- getTrackEvents: function() {
- return Popcorn.getTrackEvents.call( null, this );
- },
- getTrackEvent: function( id ) {
- return Popcorn.getTrackEvent.call( null, this, id );
- },
- getLastTrackEventId: function() {
- return Popcorn.getLastTrackEventId.call( null, this );
- },
- removeTrackEvent: function( id ) {
- Popcorn.removeTrackEvent.call( null, this, id );
- return this;
- },
- removePlugin: function( name ) {
- Popcorn.removePlugin.call( null, this, name );
- return this;
- },
- timeUpdate: function( event ) {
- Popcorn.timeUpdate.call( null, this, event );
- return this;
- }
- });
- // Plugin manifests
- Popcorn.manifest = {};
- // Plugins are registered
- Popcorn.registry = [];
- Popcorn.registryByName = {};
- // An interface for extending Popcorn
- // with plugin functionality
- Popcorn.plugin = function( name, definition, manifest ) {
- if ( Popcorn.protect.natives.indexOf( name.toLowerCase() ) >= 0 ) {
- Popcorn.error( "'" + name + "' is a protected function name" );
- return;
- }
- // Provides some sugar, but ultimately extends
- // the definition into Popcorn.p
- var reserved = [ "start", "end" ],
- plugin = {},
- setup,
- isfn = typeof definition === "function",
- methods = [ "_setup", "_teardown", "start", "end" ];
- // combines calls of two function calls into one
- var combineFn = function( first, second ) {
- first = first || Popcorn.nop;
- second = second || Popcorn.nop;
- return function() {
- first.apply( this, arguments );
- second.apply( this, arguments );
- };
- };
- // If `manifest` arg is undefined, check for manifest within the `definition` object
- // If no `definition.manifest`, an empty object is a sufficient fallback
- if ( !manifest ) {
- manifest = definition.manifest || {};
- }
- // apply safe, and empty default functions
- methods.forEach(function( method ) {
- definition[ method ] = definition[ method ] || Popcorn.nop;
- });
- var pluginFn = function( setup, options ) {
- if ( !options ) {
- return this;
- }
- // Storing the plugin natives
- var natives = options._natives = {},
- compose = "",
- defaults, originalOpts, manifestOpts, mergedSetupOpts;
- Popcorn.extend( natives, setup );
- options._natives.type = name;
- options._running = false;
- // Check for previously set default options
- defaults = this.options.defaults && this.options.defaults[ options._natives && options._natives.type ];
- // default to an empty string if no effect exists
- // split string into an array of effects
- options.compose = options.compose && options.compose.split( " " ) || [];
- options.effect = options.effect && options.effect.split( " " ) || [];
- // join the two arrays together
- options.compose = options.compose.concat( options.effect );
- options.compose.forEach(function( composeOption ) {
- // if the requested compose is garbage, throw it away
- compose = Popcorn.compositions[ composeOption ] || {};
- // extends previous functions with compose function
- methods.forEach(function( method ) {
- natives[ method ] = combineFn( natives[ method ], compose[ method ] );
- });
- });
- // Ensure a manifest object, an empty object is a sufficient fallback
- options._natives.manifest = manifest;
- // Checks for expected properties
- if ( !( "start" in options ) ) {
- options.start = 0;
- }
- if ( !( "end" in options ) ) {
- options.end = this.duration() || Number.MAX_VALUE;
- }
- // Merge with defaults if they exist, make sure per call is prioritized
- mergedSetupOpts = defaults ? Popcorn.extend( {}, defaults, options ) :
- options;
- // Resolves 239, 241, 242
- if ( !mergedSetupOpts.target ) {
- // Sometimes the manifest may be missing entirely
- // or it has an options object that doesn't have a `target` property
- manifestOpts = "options" in manifest && manifest.options;
- mergedSetupOpts.target = manifestOpts && "target" in manifestOpts && manifestOpts.target;
- }
- // Trigger _setup method if exists
- options._natives._setup && options._natives._setup.call( this, mergedSetupOpts );
- // Create new track event for this instance
- Popcorn.addTrackEvent( this, Popcorn.extend( mergedSetupOpts, options ) );
- // Future support for plugin event definitions
- // for all of the native events
- Popcorn.forEach( setup, function( callback, type ) {
- if ( type !== "type" ) {
- if ( reserved.indexOf( type ) === -1 ) {
- this.listen( type, callback );
- }
- }
- }, this );
- return this;
- };
- // Augment the manifest object
- if ( manifest || ( "manifest" in definition ) ) {
- Popcorn.manifest[ name ] = manifest || definition.manifest;
- }
- // Assign new named definition
- plugin[ name ] = function( options ) {
- return pluginFn.call( this, isfn ? definition.call( this, options ) : definition,
- options );
- };
- // Extend Popcorn.p with new named definition
- Popcorn.extend( Popcorn.p, plugin );
- // Push into the registry
- var entry = {
- fn: plugin[ name ],
- definition: definition,
- base: definition,
- parents: [],
- name: name
- };
- Popcorn.registry.push(
- Popcorn.extend( plugin, entry, {
- type: name
- })
- );
- Popcorn.registryByName[ name ] = entry;
- return plugin;
- };
- // removePlugin( type ) removes all tracks of that from all instances of popcorn
- // removePlugin( obj, type ) removes all tracks of type from obj, where obj is a single instance of popcorn
- Popcorn.removePlugin = function( obj, name ) {
- // Check if we are removing plugin from an instance or from all of Popcorn
- if ( !name ) {
- // Fix the order
- name = obj;
- obj = Popcorn.p;
- if ( Popcorn.protect.natives.indexOf( name.toLowerCase() ) >= 0 ) {
- Popcorn.error( "'" + name + "' is a protected function name" );
- return;
- }
- var registryLen = Popcorn.registry.length,
- registryIdx;
- // remove plugin reference from registry
- for ( registryIdx = 0; registryIdx < registryLen; registryIdx++ ) {
- if ( Popcorn.registry[ registryIdx ].name === name ) {
- Popcorn.registry.splice( registryIdx, 1 );
- delete Popcorn.registryByName[ name ];
- // delete the plugin
- delete obj[ name ];
- // plugin found and removed, stop checking, we are done
- return;
- }
- }
- }
- var byStart = obj.data.trackEvents.byStart,
- byEnd = obj.data.trackEvents.byEnd,
- idx, sl;
- // remove all trackEvents
- for ( idx = 0, sl = byStart.length; idx < sl; idx++ ) {
- if ( ( byStart[ idx ] && byStart[ idx ]._natives && byStart[ idx ]._natives.type === name ) &&
- ( byEnd[ idx ] && byEnd[ idx ]._natives && byEnd[ idx ]._natives.type === name ) ) {
- byStart[ idx ]._natives._teardown && byStart[ idx ]._natives._teardown.call( obj, byStart[ idx ] );
- byStart.splice( idx, 1 );
- byEnd.splice( idx, 1 );
- // update for loop if something removed, but keep checking
- idx--; sl--;
- if ( obj.data.trackEvents.startIndex <= idx ) {
- obj.data.trackEvents.startIndex--;
- obj.data.trackEvents.endIndex--;
- }
- }
- }
- };
- Popcorn.compositions = {};
- // Plugin inheritance
- Popcorn.compose = function( name, definition, manifest ) {
- // If `manifest` arg is undefined, check for manifest within the `definition` object
- // If no `definition.manifest`, an empty object is a sufficient fallback
- Popcorn.manifest[ name ] = manifest = manifest || definition.manifest || {};
- // register the effect by name
- Popcorn.compositions[ name ] = definition;
- };
- Popcorn.plugin.effect = Popcorn.effect = Popcorn.compose;
- // stores parsers keyed on filetype
- Popcorn.parsers = {};
- // An interface for extending Popcorn
- // with parser functionality
- Popcorn.parser = function( name, type, definition ) {
- if ( Popcorn.protect.natives.indexOf( name.toLowerCase() ) >= 0 ) {
- Popcorn.error( "'" + name + "' is a protected function name" );
- return;
- }
- // fixes parameters for overloaded function call
- if ( typeof type === "function" && !definition ) {
- definition = type;
- type = "";
- }
- if ( typeof definition !== "function" || typeof type !== "string" ) {
- return;
- }
- // Provides some sugar, but ultimately extends
- // the definition into Popcorn.p
- var natives = Popcorn.events.all,
- parseFn,
- parser = {};
- parseFn = function( filename, callback ) {
- if ( !filename ) {
- return this;
- }
- var that = this;
- Popcorn.xhr({
- url: filename,
- dataType: type,
- success: function( data ) {
- var tracksObject = definition( data ),
- tracksData,
- tracksDataLen,
- tracksDef,
- idx = 0;
- tracksData = tracksObject.data || [];
- tracksDataLen = tracksData.length;
- tracksDef = null;
- // If no tracks to process, return immediately
- if ( !tracksDataLen ) {
- return;
- }
- // Create tracks out of parsed object
- for ( ; idx < tracksDataLen; idx++ ) {
- tracksDef = tracksData[ idx ];
- for ( var key in tracksDef ) {
- if ( hasOwn.call( tracksDef, key ) && !!that[ key ] ) {
- that[ key ]( tracksDef[ key ] );
- }
- }
- }
- if ( callback ) {
- callback();
- }
- }
- });
- return this;
- };
- // Assign new named definition
- parser[ name ] = parseFn;
- // Extend Popcorn.p with new named definition
- Popcorn.extend( Popcorn.p, parser );
- // keys the function name by filetype extension
- //Popcorn.parsers[ name ] = true;
- return parser;
- };
- // Cache references to reused RegExps
- var rparams = /\?/,
- // XHR Setup object
- setup = {
- url: "",
- data: "",
- dataType: "",
- success: Popcorn.nop,
- type: "GET",
- async: true,
- xhr: function() {
- return new global.XMLHttpRequest();
- }
- };
- Popcorn.xhr = function( options ) {
- options.dataType = options.dataType && options.dataType.toLowerCase() || null;
- if ( options.dataType &&
- ( options.dataType === "jsonp" || options.dataType === "script" ) ) {
- Popcorn.xhr.getJSONP(
- options.url,
- options.success,
- options.dataType === "script"
- );
- return;
- }
- var settings = Popcorn.extend( {}, setup, options );
- // Create new XMLHttpRequest object
- settings.ajax = settings.xhr();
- if ( settings.ajax ) {
- if ( settings.type === "GET" && settings.data ) {
- // append query string
- settings.url += ( rparams.test( settings.url ) ? "&" : "?" ) + settings.data;
- // Garbage collect and reset settings.data
- settings.data = null;
- }
- settings.ajax.open( settings.type, settings.url, settings.async );
- settings.ajax.send( settings.data || null );
- return Popcorn.xhr.httpData( settings );
- }
- };
- Popcorn.xhr.httpData = function( settings ) {
- var data, json = null;
- settings.ajax.onreadystatechange = function() {
- if ( settings.ajax.readyState === 4 ) {
- try {
- json = JSON.parse( settings.ajax.responseText );
- } catch( e ) {
- //suppress
- }
- data = {
- xml: settings.ajax.responseXML,
- text: settings.ajax.responseText,
- json: json
- };
- // If a dataType was specified, return that type of data
- if ( settings.dataType ) {
- data = data[ settings.dataType ];
- }
- settings.success.call( settings.ajax, data );
- }
- };
- return data;
- };
- Popcorn.xhr.getJSONP = function( url, success, isScript ) {
- // If this is a script request, ensure that we do not call something that has already been loaded
- if ( isScript ) {
- var scripts = document.querySelectorAll( "script[src=\"" + url + "\"]" );
- // If there are scripts with this url loaded, early return
- if ( scripts.length ) {
- // Execute success callback and pass "exists" flag
- success && success( true );
- return;
- }
- }
- var head = document.head || document.getElementsByTagName( "head" )[ 0 ] || document.documentElement,
- script = document.createElement( "script" ),
- paramStr = url.split( "?" )[ 1 ],
- isFired = false,
- params = [],
- callback, parts, callparam;
- if ( paramStr && !isScript ) {
- params = paramStr.split( "&" );
- }
- if ( params.length ) {
- parts = params[ params.length - 1 ].split( "=" );
- }
- callback = params.length ? ( parts[ 1 ] ? parts[ 1 ] : parts[ 0 ] ) : "jsonp";
- if ( !paramStr && !isScript ) {
- url += "?callback=" + callback;
- }
- if ( callback && !isScript ) {
- // If a callback name already exists
- if ( !!window[ callback ] ) {
- // Create a new unique callback name
- callback = Popcorn.guid( callback );
- }
- // Define the JSONP success callback globally
- window[ callback ] = function( data ) {
- success && success( data );
- isFired = true;
- };
- // Replace callback param and callback name
- url = url.replace( parts.join( "=" ), parts[ 0 ] + "=" + callback );
- }
- script.onload = script.onreadystatechange = function() {
- if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) {
- // Handling remote script loading callbacks
- if ( isScript ) {
- // getScript
- success && success();
- }
- // Executing for JSONP requests
- if ( isFired ) {
- // Garbage collect the callback
- delete window[ callback ];
- // Garbage collect the script resource
- head.removeChild( script );
- }
- }
- };
- script.src = url;
- head.insertBefore( script, head.firstChild );
- return;
- };
- Popcorn.getJSONP = Popcorn.xhr.getJSONP;
- Popcorn.getScript = Popcorn.xhr.getScript = function( url, success ) {
- return Popcorn.xhr.getJSONP( url, success, true );
- };
- Popcorn.util = {
- // Simple function to parse a timestamp into seconds
- // Acceptable formats are:
- // HH:MM:SS.MMM
- // HH:MM:SS;FF
- // Hours and minutes are optional. They default to 0
- toSeconds: function( timeStr, framerate ) {
- //Hours and minutes are optional
- //Seconds must be specified
- //Seconds can be followed by milliseconds OR by the frame information
- var validTimeFormat = /^([0-9]+:){0,2}[0-9]+([.;][0-9]+)?$/,
- errorMessage = "Invalid time format";
- if ( typeof timeStr === "number" ) {
- return timeStr;
- } else if ( typeof timeStr === "string" ) {
- if ( ! validTimeFormat.test( timeStr ) ) {
- Popcorn.error( errorMessage );
- }
- } else {
- Popcorn.error( errorMessage );
- }
- var t = timeStr.split( ":" ),
- lastIndex = t.length - 1,
- lastElement = t[ lastIndex ];
- //Fix last element:
- if ( lastElement.indexOf( ";" ) > -1 ) {
- var frameInfo = lastElement.split( ";" ),
- frameTime = 0;
- if ( framerate && ( typeof framerate === "number" ) ) {
- frameTime = parseFloat( frameInfo[ 1 ], 10 ) / framerate;
- }
- t[ lastIndex ] =
- parseInt( frameInfo[ 0 ], 10 ) + frameTime;
- }
- if ( t.length === 1 ) {
- return parseFloat( t[ 0 ], 10 );
- } else if ( t.length === 2 ) {
- return ( parseInt( t[ 0 ], 10 ) * 60 ) + parseFloat( t[ 1 ], 10 );
- } else if ( t.length === 3 ) {
- return ( parseInt( t[ 0 ], 10 ) * 3600 ) +
- ( parseInt( t[ 1 ], 10 ) * 60 ) +
- parseFloat( t[ 2 ], 10 );
- }
- }
- };
- // Exposes Popcorn to global context
- global.Popcorn = Popcorn;
- document.addEventListener( "DOMContentLoaded", function() {
- // Supports non-specific elements
- var dataAttr = "data-timeline-sources",
- medias = document.querySelectorAll( "[" + dataAttr + "]" );
- Popcorn.forEach( medias, function( idx, key ) {
- var media = medias[ key ],
- hasDataSources = false,
- dataSources, data, popcornMedia;
- // Ensure that the DOM has an id
- if ( !media.id ) {
- media.id = Popcorn.guid( "__popcorn" );
- }
- // Ensure we're looking at a dom node
- if ( media.nodeType && media.nodeType === 1 ) {
- popcornMedia = Popcorn( "#" + media.id );
- dataSources = ( media.getAttribute( dataAttr ) || "" ).split( "," );
- if ( dataSources[ 0 ] ) {
- Popcorn.forEach( dataSources, function( source ) {
- // split the parser and data as parser!file
- data = source.split( "!" );
- // if no parser is defined for the file, assume "parse" + file extension
- if ( data.length === 1 ) {
- data = source.split( "." );
- data[ 0 ] = "parse" + data[ data.length - 1 ].toUpperCase();
- data[ 1 ] = source;
- }
- // If the media has data sources and the correct parser is registered, continue to load
- if ( dataSources[ 0 ] && popcornMedia[ data[ 0 ] ] ) {
- // Set up the media and load in the datasources
- popcornMedia[ data[ 0 ] ]( data[ 1 ] );
- }
- });
- }
- // Only play the media if it was specified to do so
- if ( !!popcornMedia.autoplay ) {
- popcornMedia.play();
- }
- }
- });
- }, false );
- })(window, window.document);
- // PLUGIN: Attribution
- (function( Popcorn ) {
-
- /**
- * Attribution popcorn plug-in
- * Adds text to an element on the page.
- * Options parameter will need a mandatory start, end, target.
- * Optional parameters include nameofwork, NameOfWorkUrl, CopyrightHolder, CopyrightHolderUrl, license & licenseUrl.
- * Start is the time that you want this plug-in to execute
- * End is the time that you want this plug-in to stop executing
- * Target is the id of the document element that the text needs to be attached to, this target element must exist on the DOM
- * nameofwork is the title of the attribution
- * NameOfWorkUrl is a url that provides more details about the attribution
- * CopyrightHolder is the name of the person/institution that holds the rights to the attribution
- * CopyrightHolderUrl is the url that provides more details about the copyrightholder
- * license is the type of license that the work is copyrighted under
- * LicenseUrl is the url that provides more details about the ticense type
- * @param {Object} options
- *
- * Example:
- var p = Popcorn('#video')
- .attribution({
- start: 5, // seconds
- end: 15, // seconds
- target: 'attributiondiv'
- } )
- *
- */
- Popcorn.plugin( "attribution" , (function(){
-
- var
- common = "data:image/png;base64,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…
Large files files are truncated, but you can click here to view the full file