Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 105e52d

Browse files
committed
[CHG]增加播放成功,播放失败回调函数
1 parent 4af851d commit 105e52d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

demos/base-demo/ezuikit.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
function matchIframeUrl() {
131131
switch (EZUIKit.opt.template) {
132132
case 'simple':
133-
return "https://open.ys7.com/ezopen/h5/iframe?url=" + EZUIKit.opt.url + "&autoplay=" + EZUIKit.opt.autoplay + "&audio=" + EZUIKit.opt.audio + "&accessToken=" + params.accessToken + "&templete=0";
133+
return "http://y.ys7.com:3100/ezopen/h5/iframe?url=" + EZUIKit.opt.url + "&autoplay=" + EZUIKit.opt.autoplay + "&audio=" + EZUIKit.opt.audio + "&accessToken=" + params.accessToken + "&templete=0";
134+
// return "https://open.ys7.com/ezopen/h5/iframe?url=" + EZUIKit.opt.url + "&autoplay=" + EZUIKit.opt.autoplay + "&audio=" + EZUIKit.opt.audio + "&accessToken=" + params.accessToken + "&templete=0";
134135
case 'standard':
135136
return "https://open.ys7.com/ezopen/h5/iframe?url=" + EZUIKit.opt.url + "&autoplay=" + EZUIKit.opt.autoplay + "&audio=" + EZUIKit.opt.audio + "&accessToken=" + params.accessToken + "&templete=1";
136137
case 'security':
@@ -1002,6 +1003,16 @@
10021003
params.getOSDTimeCallBack(event.data)
10031004
}
10041005
break;
1006+
case 'handleSuccess':
1007+
if (params.handleSuccess) {
1008+
params.handleSuccess(event.data)
1009+
}
1010+
break;
1011+
case 'handleError':
1012+
if (params.handleError) {
1013+
params.handleError(event.data)
1014+
}
1015+
break;
10051016
}
10061017
}
10071018
})

demos/base-demo/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ <h2>视频模式使用示例:</h2>
4848
capturePictureCallBack: (data) => console.log("截图成功回调",data),
4949
fullScreenCallBack: (data) => console.log("全屏回调",data),
5050
getOSDTimeCallBack: (data) => console.log("获取OSDTime回调",data),
51+
handleSuccess: (data) => console.log("播放成功回调",data),
52+
handleError: (data) => console.log("播放失败回调",data),
5153
width:600,
5254
height:400,
5355
})

0 commit comments

Comments
 (0)