matches = rIdExp.exec( entity );
-
if ( matches.length && matches[2] ) {
-
elem = document.getElementById(matches[2]);
-
}
this.video = elem ? elem : null;
timelines: []
};
-
return this;
}
};
-
// This trick allows our api methods to be chained to
// instance references.
Popcorn.p.init.prototype = Popcorn.p;
return obj;
};
-
Popcorn.extend = function( obj ) {
var dest = obj, src = slice.call(arguments, 1);
return dest;
};
-
// A Few reusable utils, memoized onto Popcorn
Popcorn.extend( Popcorn, {
guid: function() {
return size;
}
});
-
// Simple Factory pattern to implement native
// getters/setters and controllers
// and returns an object of methods
Popcorn.extend(Popcorn.p, (function () {
-
// todo: play, pause, mute should toggle
var methods = "load play pause currentTime playbackRate mute volume",
ret = {};
})()
);
-
var nativeEvents = "loadstart progress suspend emptied stalled play pause " +
"loadedmetadata loadeddata waiting playing canplay canplaythrough " +
"seeking seeked timeupdate ended ratechange durationchange volumechange";
-
-
Popcorn.events = {
//todo, fix types to be custom, natives will be native only
types: nativeEvents.split(/\s+/g),
}
};
-
// Extend listen and trigger to all Popcorn instances
Popcorn.forEach( ["trigger", "listen"], function ( key ) {
Popcorn.p[key] = Popcorn.events.fn[key];
};
-
global.Popcorn = Popcorn;
})(window);
\ No newline at end of file