Lines Matching refs:Popcorn

5     global.Popcorn = {  class in global
14 global.Popcorn[ methods.shift() ] = function() {}; function
30 _Popcorn = global.Popcorn,
91 Popcorn = function( entity, options ) { function
93 return new Popcorn.p.init( entity, options || null );
97 Popcorn.version = "@VERSION";
100 Popcorn.isSupported = true;
103 Popcorn.instances = [];
107 Popcorn.p = Popcorn.prototype = {
122 entity( document, Popcorn );
145 readyStack[ i ].call( document, Popcorn );
176 this.options = Popcorn.extend( {}, options ) || {};
179 this.id = this.options.id || Popcorn.guid( nodeName );
182 if ( Popcorn.byId( this.id ) ) {
196 timeUpdate: Popcorn.nop,
223 Popcorn.instances.push( this );
250 Popcorn.addTrackEvent( self, {
307 Popcorn.timeUpdate( self, {} );
310 Popcorn.forEach( Popcorn.manifest, function( key, val ) {
338 Popcorn.timeUpdate( self, event );
378 Popcorn.p.init.prototype = Popcorn.p;
380 Popcorn.byId = function( str ) {
381 var instances = Popcorn.instances,
394 Popcorn.forEach = function( obj, fn, context ) {
424 Popcorn.extend = function( obj ) {
427 Popcorn.forEach( src, function( copy ) {
438 Popcorn.extend( Popcorn, {
442 global.Popcorn = _Popcorn;
445 return Popcorn;
451 Popcorn.guid.counter++;
452 return ( prefix ? prefix : "" ) + ( +new Date() + Popcorn.guid.counter );
498 return Popcorn.extend({}, bounds, { top: top, left: left });
509 if ( plugin in Popcorn.registryByName &&
518 Popcorn.extend({}, event, {
536 if ( plugin in Popcorn.registryByName &&
545 Popcorn.extend({}, event, {
571 for ( plugin in Popcorn.registryByName ) {
572 Popcorn.removePlugin( instance, plugin );
584 Popcorn.instances.splice( Popcorn.instances.indexOf( instance ), 1 );
589 Popcorn.guid.counter = 1;
594 Popcorn.extend(Popcorn.p, (function() {
602 Popcorn.forEach( methods.split( /\s+/g ), function( name ) {
614 this.media.currentTime = Popcorn.util.toSeconds( arg );
650 Popcorn.forEach( "enable disable".split(" "), function( method ) {
651 Popcorn.p[ method ] = function( plugin ) {
652 return Popcorn[ method ]( this, plugin );
656 Popcorn.extend(Popcorn.p, {
674 sec = Popcorn.util.toSeconds( id );
690 id = Popcorn.guid( "cue" );
711 Popcorn.removeTrackEvent.ref( this, id );
741 sec = Popcorn.util.toSeconds( time );
750 fn = fn || Popcorn.nop();
769 start: fn || Popcorn.nop,
770 end: Popcorn.nop,
776 options = Popcorn.extend( trackEvent, options );
782 options._id = options.id || options._id || Popcorn.guid( options._natives.type );
790 Popcorn.addTrackEvent.ref( this, options );
792 this.emit( eventType, Popcorn.extend({}, options, {
801 fn: fn || Popcorn.nop
807 Popcorn.addTrackEvent( this, options );
846 return Popcorn.position( this.media );
851 return Popcorn[ this.data.disabled[ plugin ] ? "enable" : "disable" ]( this, plugin );
859 if ( Popcorn.isArray( plugin ) ) {
861 Popcorn.forEach( plugin, function( obj ) {
878 Popcorn.extend( this.options.defaults[ plugin ], defaults );
884 Popcorn.Events = {
892 Popcorn.Events.Natives = Popcorn.Events.UIEvents + " " +
893 Popcorn.Events.MouseEvents + " " +
894 Popcorn.Events.Events;
921 })( Popcorn.Events, internal.events );
923 Popcorn.events = {
930 if ( !Popcorn.events.isNative( type ) ) {
950 all: Popcorn.Events.Natives.split( /\s+/g ),
959 eventInterface = Popcorn.events.getInterface( type );
984 eventHook = Popcorn.events.hooks[ type ],
1036 if ( !hasEvents && Popcorn.events.all.indexOf( type ) > -1 ) {
1123Popcorn.forEach( [ [ "trigger", "emit" ], [ "listen", "on" ], [ "unlisten", "off" ] ], function( k…
1124 Popcorn.p[ key[ 0 ] ] = Popcorn.p[ key[ 1 ] ] = Popcorn.events.fn[ key[ 0 ] ];
1147 Popcorn.extend( {}, track, {
1175 Popcorn.extend( {}, track, {
1245 track.start = Popcorn.util.toSeconds( track.start, this.parent.options.framerate );
1246 track.end = Popcorn.util.toSeconds( track.end, this.parent.options.framerate );
1415 Popcorn.addTrackEvent = function( obj, track ) {
1432 temp = Popcorn.extend( {}, track );
1436 Popcorn.extend( track, obj.options.defaults[ track._natives.type ], temp );
1441 track._id = track.id || track._id || Popcorn.guid( track._natives.type );
1448 obj.emit( "tracksetup", Popcorn.extend( {}, track, {
1463 Popcorn.addTrackEvent.ref( obj, track );
1466 obj.emit( "trackadded", Popcorn.extend({}, track,
1474 Popcorn.addTrackEvent.ref = function( obj, track ) {
1480 Popcorn.removeTrackEvent = function( obj, removeId ) {
1496 Popcorn.removeTrackEvent.ref( obj, removeId );
1501 obj.emit( "trackremoved", Popcorn.extend({}, track, {
1510 Popcorn.removeTrackEvent.ref = function( obj, removeId ) {
1517 Popcorn.getTrackEvents = function( obj ) {
1537 Popcorn.getTrackEvents.ref = function( obj ) {
1542 Popcorn.getTrackEvent = function( obj, trackId ) {
1547 Popcorn.getTrackEvent.ref = function( obj, trackId ) {
1551 Popcorn.getLastTrackEventId = function( obj ) {
1555 Popcorn.timeUpdate = function( obj, event ) {
1563 registryByName = Popcorn.registryByName,
1594 Popcorn.extend({}, byEnd, {
1606 Popcorn.removeTrackEvent( obj, byEnd._id );
1631 Popcorn.extend({}, byStart, {
1642 Popcorn.removeTrackEvent( obj, byStart._id );
1672 Popcorn.extend({}, byStart, {
1683 Popcorn.removeTrackEvent( obj, byStart._id );
1710 Popcorn.extend({}, byEnd, {
1721 Popcorn.removeTrackEvent( obj, byEnd._id );
1738 Popcorn.extend( Popcorn.p, {
1741 return Popcorn.getTrackEvents.call( null, this );
1745 return Popcorn.getTrackEvent.call( null, this, id );
1749 return Popcorn.getLastTrackEventId.call( null, this );
1754 Popcorn.removeTrackEvent.call( null, this, id );
1759 Popcorn.removePlugin.call( null, this, name );
1764 Popcorn.timeUpdate.call( null, this, event );
1769 Popcorn.destroy.call( null, this );
1775 Popcorn.manifest = {};
1777 Popcorn.registry = [];
1778 Popcorn.registryByName = {};
1781 Popcorn.plugin = function( name, definition, manifest ) {
1783 if ( Popcorn.protect.natives.indexOf( name.toLowerCase() ) >= 0 ) {
1784 Popcorn.error( "'" + name + "' is a protected function name" );
1799 first = first || Popcorn.nop;
1800 second = second || Popcorn.nop;
1810 Popcorn.manifest[ name ] = manifest = manifest || definition.manifest || {};
1814 definition[ method ] = safeTry( definition[ method ] || Popcorn.nop, name );
1826 if ( options.ranges && Popcorn.isArray(options.ranges) ) {
1827 Popcorn.forEach( options.ranges, function( range ) {
1831 var opts = Popcorn.extend( {}, options, range );
1850 Popcorn.extend( natives, setup );
1881 Popcorn.extend( {}, options, {
1884 track: Popcorn.getTrackEvent( this, options.id || options._id )
1892 this.emit( "trackteardown", Popcorn.extend( {}, options, {
1895 track: Popcorn.getTrackEvent( this, options.id || options._id )
1916 compose = Popcorn.compositions[ composeOption ] || {};
1967 options._id = Popcorn.guid( options._natives.type );
1974 options._id = options.id || options._id || Popcorn.guid( options._natives.type );
1981 this.emit( "tracksetup", Popcorn.extend( {}, options, {
1996 Popcorn.addTrackEvent.ref( this, options );
2000 Popcorn.addTrackEvent( this, options );
2005 Popcorn.forEach( setup, function( callback, type ) {
2018 Popcorn.p[ name ] = plugin[ name ] = function( id, options ) {
2082 Popcorn.extend( trackEvent, options );
2093 Popcorn.removeTrackEvent.ref( this, id );
2100 … trackEvent._id = trackEvent.id || trackEvent._id || Popcorn.guid( trackEvent._natives.type );
2106 this.emit( "tracksetup", Popcorn.extend( {}, trackEvent, {
2119 Popcorn.addTrackEvent.ref( this, trackEvent );
2153 mergedSetupOpts = Popcorn.extend( {}, defaults, options );
2164 Popcorn.extend( definition, {
2177 Popcorn.registry.push(
2178 Popcorn.extend( plugin, entry, {
2182 Popcorn.registryByName[ name ] = entry;
2188 Popcorn.plugin.errors = [];
2195 if ( Popcorn.plugin.debug ) {
2204 Popcorn.plugin.errors.push({
2212 this.emit( "pluginerror", Popcorn.plugin.errors );
2219 Popcorn.plugin.debug = ( Popcorn.version === "@" + "VERSION" );
2223 Popcorn.removePlugin = function( obj, name ) {
2230 obj = Popcorn.p;
2232 if ( Popcorn.protect.natives.indexOf( name.toLowerCase() ) >= 0 ) {
2233 Popcorn.error( "'" + name + "' is a protected function name" );
2237 var registryLen = Popcorn.registry.length,
2242 if ( Popcorn.registry[ registryIdx ].name === name ) {
2243 Popcorn.registry.splice( registryIdx, 1 );
2244 delete Popcorn.registryByName[ name ];
2245 delete Popcorn.manifest[ name ];
2301 Popcorn.compositions = {};
2304 Popcorn.compose = function( name, definition, manifest ) {
2308 Popcorn.manifest[ name ] = manifest = manifest || definition.manifest || {};
2311 Popcorn.compositions[ name ] = definition;
2314 Popcorn.plugin.effect = Popcorn.effect = Popcorn.compose;
2319 Popcorn.dom = {
2364 if ( Popcorn.dom.debug ) {
2381 success: Popcorn.nop,
2387 Popcorn.xhr = function( options ) {
2395 Popcorn.xhr.getJSONP(
2405 settings = Popcorn.extend( {}, setup, options );
2433 return Popcorn.xhr.httpData( settings );
2438 Popcorn.xhr.httpData = function( settings ) {
2488 Popcorn.xhr.getJSONP = function( url, success, isScript ) {
2517 callback = Popcorn.guid( prefix );
2523 callback = Popcorn.guid( "jsonp" );
2585 Popcorn.getJSONP = Popcorn.xhr.getJSONP;
2587 Popcorn.getScript = Popcorn.xhr.getScript = function( url, success ) {
2589 return Popcorn.xhr.getJSONP( url, success, true );
2592 Popcorn.util = {
2613 Popcorn.error( errorMessage );
2651 Popcorn.p.cue = Popcorn.p.exec;
2654 Popcorn.protect = {
2655 natives: getKeys( Popcorn.p ).map(function( val ) {
2661 Popcorn.forEach({
2669 var original = Popcorn.p[ api ];
2672 Popcorn.p[ api ] = function() {
2680 Popcorn.p[ api ] = original;
2682 return Popcorn.p[ recommend ].apply( this, [].slice.call( arguments ) );
2688 global.Popcorn = Popcorn;