Sha256: 608f7923462402c8d1711ec8714344333a213a4a6a2ff765dafb5c624531ebba
Contents?: true
Size: 818 Bytes
Versions: 27
Compression:
Stored size: 818 Bytes
Contents
pageflow.VideoPlayer.srcFromOptionsMethod = function(player) { var extensions = ['webm', 'm3u8', 'mp4']; player.srcFromOptions = function() { var extension = getVideoExtension(player.currentSrc()), source = detectSourceWithExtension(extension); if (extension && source) { return source.src; } else { return player.currentSrc(); } }; function getVideoExtension(src) { return _.detect(extensions, function(extension) { return matchesExtension(src, extension); }); } function detectSourceWithExtension(extension) { return _.detect(player.options().sources, function(source) { return matchesExtension(source.src, extension); }); } function matchesExtension(src, extension) { return src.indexOf('.' + extension + '?') >= 0; } };
Version data entries
27 entries across 27 versions & 1 rubygems