芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/moodledata/localcache/requirejs/ed007507ad1977fecb1a7ee4e9fe7bf09fd00ee9
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("video.js")):"function"==typeof define&&define.amd?define('media_videojs/Youtube-lazy', ["media_videojs/video-lazy"],function(c){return a.Youtube=b(c)}):a.Youtube=b(a.videojs)}(this,function(a){"use strict";function b(){YT.ready(function(){g.isApiReady=!0;for(var a=0;a
1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(a){var b=a.data;if(b!==this.lastState&&!this.errorNumber)switch(this.lastState=b,b){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(a){this.errorNumber=a.data,this.trigger("pause"),this.trigger("error")},error:function(){var a=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:a,message:"Error while trying to play the video"};case 2:case 100:return{code:a,message:"Unable to find the video"};case 101:case 150:return{code:a,message:"Playback on other Websites has been disabled by the video owner."}}return{code:a,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(a){var b={videoId:a};this.options_.start&&(b.startSeconds=this.options_.start),this.options_.end&&(b.endEnd=this.options_.end),this.ytPlayer.loadVideoById(b)},cueVideoById_:function(a){var b={videoId:a};this.options_.start&&(b.startSeconds=this.options_.start),this.options_.end&&(b.endEnd=this.options_.end),this.ytPlayer.cueVideoById(b)},src:function(a){return a&&this.setSrc({src:a}),this.source},poster:function(){return e?null:this.poster_},setPoster:function(a){this.poster_=a},setSrc:function(a){a&&a.src&&(delete this.errorNumber,this.source=a,this.url=g.parseUrl(a.src),this.options_.poster||this.url.videoId&&(this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg",this.trigger("posterchange"),this.checkHighResPoster()),this.options_.autoplay&&!e?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0))},autoplay:function(){return this.options_.autoplay},setAutoplay:function(a){this.options_.autoplay=a},loop:function(){return this.options_.loop},setLoop:function(a){this.options_.loop=a},play:function(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))},pause:function(){this.ytPlayer&&this.ytPlayer.pauseVideo()},paused:function(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(a){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(a,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==a&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))},seeking:function(){return this.isSeeking},seekable:function(){return this.ytPlayer?a.createTimeRange(0,this.ytPlayer.getDuration()):a.createTimeRange()},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(a){this.ytPlayer&&this.ytPlayer.setPlaybackRate(a)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(a){this.ytPlayer&&this.ytPlayer.setVolume(100*a)},muted:function(){return!!this.ytPlayer&&this.ytPlayer.isMuted()},setMuted:function(a){this.ytPlayer&&(this.muted(!0),a?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout(function(){this.trigger("volumechange")},50))},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return a.createTimeRange();var b=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return a.createTimeRange(0,b)},preload:function(){},load:function(){},reset:function(){},supportsFullScreen:function(){return!0},checkHighResPoster:function(){var a="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var b=new Image;b.onload=function(){if("naturalHeight"in b){if(b.naturalHeight<=90||b.naturalWidth<=120)return}else if(b.height<=90||b.width<=120)return;this.poster_=a,this.trigger("posterchange")}.bind(this),b.onerror=function(){},b.src=a}catch(c){}}});g.isSupported=function(){return!0},g.canPlaySource=function(a){return g.canPlayType(a.type)},g.canPlayType=function(a){return"video/youtube"===a},g.parseUrl=function(a){var b={videoId:null},c=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,d=a.match(c);d&&11===d[2].length&&(b.videoId=d[2]);var e=/[?&]list=([^#\&\?]+)/;return d=a.match(e),d&&d[1]&&(b.listId=d[1]),b},g.apiReadyQueue=[],"undefined"!=typeof document&&(c("https://www.youtube.com/iframe_api",b),d()),"undefined"!=typeof a.registerTech?a.registerTech("Youtube",g):a.registerComponent("Youtube",g)});