Files
Testing/flowplayer/flowplayer.min.js

5 lines
26 KiB
JavaScript
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
/*!
Flowplayer v5.1.1 (Friday, 19. October 2012 04:24PM) | flowplayer.org/license
*/!function(e){function a(t,n){window.objectId=new Object;var r="obj"+(""+Math.random()).slice(2,15),i='<object class="fp-engine" id="'+r+'" name="'+r+'" ';i+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+t+'" type="application/x-shockwave-flash">';var o={width:"100%",height:"100%",allowscriptaccess:"always",wmode:"opaque",quality:"high",flashvars:"",movie:t+(s?"?"+r:""),name:r};return e.each(n,function(e,t){o.flashvars+=e+"="+t+"&"}),e.each(o,function(e,t){i+='<param name="'+e+'" value="'+t+'"/>'}),i+="</object>",e(i)}function c(e){return Math.round(e*100)/100}function p(e){var t=e.attr("type"),n=e.attr("src");return{src:n,type:t?t.replace("video/",""):n.split(h)[1]}}function d(e){return e=parseInt(e,10),e>=10?e:"0"+e}function v(e){e=e||0;var t=Math.floor(e/3600),n=Math.floor(e/60);return e-=n*60,t>=1?(n-=t*60,t+"h:"+d(n)):d(n)+":"+d(e)}e(function(){typeof e.fn.flowplayer=="function"&&e("video").parent(".flowplayer").flowplayer()});var t=[],n=[],r=navigator.userAgent,i=/iPhone/i.test(r)||/Android/.test(r)&&/Firefox/.test(r);window.flowplayer=function(r){return i?0:e.isFunction(r)?n.push(r):typeof r=="number"||r===undefined?t[r||0]:e(r).data("flowplayer")},e.extend(flowplayer,{version:"5.1.1",engine:{},conf:{},defaults:{debug:!1,disabled:!1,engine:"html5",keyboard:!0,ratio:9/16,rtmp:0,splash:!1,swf:"http://releases.flowplayer.org/5.1.1/flowplayer.swf",speeds:[.25,.5,1,1.5,2],volume:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL"]},support:{}});if(i)return e(function(){e("video").attr("controls","controls")});e.fn.flowplayer=function(r,i){return typeof r=="string"&&(r={swf:r}),e.isFunction(r)&&(i=r,r={}),!r&&this.data("flowplayer")||this.each(function(){var s=e(this),o=e.extend({},flowplayer.defaults,flowplayer.conf,r,s.data()),u=e("video",s),a,f=[],l,c,h={conf:o,currentSpeed:1,volumeLevel:o.volume,video:null,splash:!1,ready:!1,paused:!1,playing:!1,loading:!1,muted:!1,disabled:!1,finished:!1,load:function(t,n){if(h.error||h.loading||h.disabled)return;return s.trigger("load",[h,t,c]),e.isFunction(t)&&(n=t),n&&s.one("ready",n),h},pause:function(e){return h.ready&&!h.seeking&&!h.disabled&&!h.loading&&(c.pause(),h.one("pause",e)),h},resume:function(){return h.ready&&h.paused&&!h.disabled&&(c.resume(),h.finished&&(h.trigger("resume"),h.finished=!1)),h},toggle:function(){return h.ready?h.paused?h.resume():h.pause():h.load()},seek:function(t,n){if(h.ready){if(typeof t=="boolean"){var r=h.video.duration*.1;t=h.video.time+(t?r:-r)}t=a=Math.min(Math.max(t,0),h.video.duration),c.seek(t),e.isFunction(n)&&s.one("seek",n)}return h},seekTo:function(e,t){var n=e===undefined?a:h.video.duration*.1*e;return h.seek(n,t)},volume:function(e){return h.ready&&e!=h.volumeLevel&&c.volume(Math.min(Math.max(e,0),1)),h},speed:function(t,n){return h.ready&&(typeof t=="boolean"&&(t=o.speeds[e.inArray(h.currentSpeed,o.speeds)+(t?1:-1)]||h.currentSpeed),c.speed(t),n&&s.one("speed",n)),h},stop:function(){return h.ready&&c.stop(),h},unload:function(){return s.hasClass("is-embedding")||(o.splash?(h.trigger("unload"),c.unload()):h.stop()),h}};e.each(["disable","mute"],function(e,t){h[t]=function(){return h.trigger(t)}}),e.each(["bind","one","unbind"],function(e,t){h[t]=function(e,n){return s[t](e,n),h}}),h.trigger=function(e,t){return s.trigger(e,[h,t]),h},s.bind("boot",function(){e.each(["autoplay","loop","preload","poster"],function(e,t){var n=u.attr(t);n!==undefined&&(o[t]=n?n:!0)});if(o.splash||s.hasClass("is-splash"))h.splash=o.splash=o.autoplay=!0,s.addClass("is-splash");o.poster&&delete o.autoplay,e.each(n,function(e){this(h,s)}),c=flowplayer.engine[o.engine],c&&(c=c(h,s)),c?h.engine=o.engine:(delete flowplayer.engine[o.engine],e.each(flowplayer.engine,function(e,t){return c=this(h,s),c&&(h.engine=e),!1}));if(!c)return h.trigger("error",{code:5});o.splash?h.unload():h.load(),o.disabled&&h.disable(),s.one("ready",i),t.push(h)}).bind("load",function(t,n,r){o.splash&&e(".flowpla