js如何判断video播放的视频内容是已经缓存了的还是新请求的?
比如clppr.js里面也没有相关的状态判断。
// You can either listen some events this way
var player = new Clappr.Player({
events: {
onReady: function() { ... }, //Fired when the player is ready on startup
onResize: function() { ... },//Fired when player resizes
onPlay: function() { ... },//Fired when player starts to play
onPause: function() { ... },//Fired when player pauses
onStop: function() { ... },//Fired when player stops
onEnded: function() { ... },//Fired when player ends the video
onSeek: function() { ... },//Fired when player seeks the video
onError: function() { ... },//Fired when player receives an error
onTimeUpdate: function() { ... },//Fired when the time is updated on player
onVolumeUpdate: function() { ... },//Fired when player updates its volume
}
})
// or this way
player.on(Clappr.Events.PLAYER_PLAY, function() { ... })
慕斯709654
相关分类