github html5视频直播,GitHub - jackzhang1204/sewise-player: HTML5 Video Player

//点播接口调用方法

function startPlay(){

SewisePlayer.doPlay();

}

function playPause(){

SewisePlayer.doPause();

}

function seekTo(){

SewisePlayer.doSeek(5);

}

function playStop(){

SewisePlayer.doStop();

}

function changeVolume(){

SewisePlayer.setVolume(0.1);

}

function getDuration(){

alert(SewisePlayer.duration());

}

function getPlayTime(){

alert(SewisePlayer.playTime());

}

// function switchProgram(){

// SewisePlayer.playProgram("xqfa3cZn", 0, true);

// }

function switchVideo(){

SewisePlayer.toPlay("http://media.w3.org/2010/05/sintel/trailer.mp4", "Sintel", 0, true);

}

//播放器回调方法

function playerReady(name){

console.log("Sewise Player On Ready 1");

//SewisePlayer.toPlay("http://www.w3school.com.cn/i/movie.mp4", "title", 0, false);

}

SewisePlayer.playerReady(function(name){

console.log("Sewise Player On Ready 2");

});

function onStart(name){

console.log("onStart 1");

}

SewisePlayer.onStart(function(name){

console.log("onStart 2");

});

function onStop(name){

console.log("onStop 1");

}

SewisePlayer.onStop(function(name){

console.log("onStop 2");

});

function onMetadata(meta, name){

console.log("onMetadata 1");

}

SewisePlayer.onMetadata(function(meta, name){

console.log("onMetadata 2");

});

function onClarity(clarity, name){

console.log("onClarity 1");

}

SewisePlayer.onClarity(function(clarity, name){

console.log("onClarity 2");

});

function onPause(name){

console.log("onPause 1");

}

SewisePlayer.onPause(function(name){

console.log("onPause 2");

});

function onSeek(time, name){

console.log("onSeek 1: " + time);

}

SewisePlayer.onSeek(function(time, name){

console.log("onSeek 2: " + time);

});

function onPlayTime(time, name){

console.log("onPlayTime 1: " + time);

}

SewisePlayer.onPlayTime(function(time, name){

console.log("onPlayTime 2: " + time);

});

function onBuffer(pt, name){

console.log("onBuffer 1: " + pt);

}

SewisePlayer.onBuffer(function(pt, name){

console.log("onBuffer 2: " + pt);

});

[点播接口]
播放
暂停
跳转
停止
更改音量
获取总时长
获取当前时间
切换视频
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值