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

Skip to content

Commit e25efee

Browse files
committed
[CHG]修复autoplay 不生效问题
1 parent 2fa2160 commit e25efee

File tree

8 files changed

+20
-25
lines changed

8 files changed

+20
-25
lines changed

demos/base-demo/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ <h2>视频模式使用示例:</h2>
1212
<div id="video-container"
1313
style="width:600px;height:600px;">
1414
</div>
15-
<div id="video-container2"
16-
style="width:600px;height:600px;">
17-
</div>
1815
<div>
1916
<!-- <button onClick={()=> this.playr.stop()}>stop</button>
2017
<button onClick={()=> this.playr.openSound()}>openSound</button>
@@ -32,9 +29,10 @@ <h2>视频模式使用示例:</h2>
3229
<script>
3330
var playr = new EZUIKit.EZUIKitPlayer({
3431
id: 'video-container', // 视频容器ID
35-
accessToken: 'at.3bvmj4ycamlgdwgw1ig1jruma0wpohl6-48zifyb39c-13t5am6-yukyi86mz',
36-
url: 'ezopen://open.ys7.com/D88600067/1.live',
37-
template: 'voice', // simple - 极简版;standard-标准版;security - 安防版(预览回放);vioce-语音版;
32+
accessToken: 'at.5eust80k28pq5i8w7blbhl8e4vft3bwq-7slhtrs9dm-1fhprbb-tafuv0h5j',
33+
url: 'ezopen://open.ys7.com/203751922/1.live',
34+
template: 'simple', // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
35+
autoplay: true,
3836
// 视频上方头部控件
3937
//header: ['capturePicture','save','zoom'], // 如果templete参数不为simple,该字段将被覆盖
4038
// 视频下方底部控件

demos/react-demo/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/react-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@testing-library/react": "^9.5.0",
88
"@testing-library/user-event": "^7.2.1",
99
"axios": "^0.19.2",
10-
"ezuikit-js": "0.0.5",
10+
"ezuikit-js": "0.0.6",
1111
"react": "^16.13.1",
1212
"react-dom": "^16.13.1",
1313
"react-scripts": "3.4.1"

demos/react-demo/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class App extends React.Component{
1414
id: 'video-container', // 视频容器ID
1515
accessToken: 'at.9ymd5rys4lk1zv6o2rtr51a624s9gl56-5fitodjuss-0tkvm8j-hras1ewfu',
1616
url: 'ezopen://open.ys7.com/203751922/1.live',
17-
template: 'security', // simple - 极简版;standard-标准版;security - 安防版(预览回放);vioce-语音版;
17+
template: 'security', // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
1818
// 视频上方头部控件
1919
// header: ['capturePicture','save','zoom'], // 如果templete参数不为simple,该字段将被覆盖
2020
// // 视频下方底部控件

demos/vue-demo/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/vue-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"dependencies": {
1111
"core-js": "^3.6.4",
12-
"ezuikit-js": "0.0.5",
12+
"ezuikit-js": "0.0.6",
1313
"vue": "^2.6.11"
1414
},
1515
"devDependencies": {

demos/vue-demo/src/components/EZUIKitJs.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<template>
22
<div class="hello-ezuikit-js">
33
<div id="video-container" style="width:600px;height:600px"></div>
4-
5-
<div>aa</div>
64
</div>
75
</template>
86

@@ -17,12 +15,11 @@ export default {
1715
mounted: () => {
1816
console.group("mounted 组件挂载完毕状态===============》");
1917
var player = new EZUIKit.EZUIKitPlayer({
20-
autoplay: false,
18+
autoplay: true,
2119
id: "video-container",
22-
accessToken:"at.6edcu7kk3txmf3j452p1vc8uayg8lf62-6iijcee591-0i3qvn2-siyx8l4rz",
20+
accessToken:"at.5eust80k28pq5i8w7blbhl8e4vft3bwq-7slhtrs9dm-1fhprbb-tafuv0h5j",
2321
url: "ezopen://open.ys7.com/203751922/1.live",
24-
// autoplay:false,
25-
template: "simple", // simple - 极简版;standard-标准版;security - 安防版(预览回放);vioce-语音版;
22+
template: "simple", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
2623
// 视频上方头部控件
2724
//header: ["capturePicture", "save", "zoom"], // 如果templete参数不为simple,该字段将被覆盖
2825
//plugin: ['talk'], // 加载插件,talk-对讲
@@ -40,9 +37,9 @@ export default {
4037
height: 400
4138
});
4239
console.log("player",player);
43-
setTimeout(()=>{
44-
player.play(); // 方法调用示例,10秒后关闭视频
45-
},5000)
40+
// setTimeout(()=>{
41+
// player.stop(); // 方法调用示例,10秒后关闭视频
42+
// },10000)
4643
}
4744
};
4845
</script>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ezuikit-js",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "ezuikit javascript for npm",
55
"main": "ezuikit.js",
66
"scripts": {

0 commit comments

Comments
 (0)