Skip to content

Commit 87acb03

Browse files
committed
demo: update ezuikit-js@8.1.10-beta.1
1 parent 7fefd10 commit 87acb03

File tree

9 files changed

+60
-35
lines changed

9 files changed

+60
-35
lines changed

demos/vue-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "my-project",
2+
"name": "vue-demo",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</template>
2323

2424
<script>
25-
import EZUIKit from "ezuikit-js";
25+
import { EZUIKitPlayer } from "ezuikit-js";
2626
var player = null;
2727
2828
export default {
@@ -45,7 +45,7 @@ export default {
4545
// var accessToken = res.data.accessToken;
4646
4747
// });
48-
player = new EZUIKit.EZUIKitPlayer({
48+
player = new EZUIKitPlayer({
4949
id: "video-container", // 视频容器ID
5050
accessToken:
5151
"at.d525oyj8d7bwohb40ssn3266cfq2mwi2-8hgpypehn9-1fafaty-ea2fxbc1",
@@ -91,24 +91,24 @@ export default {
9191
// ],
9292
});
9393
94-
player.eventEmitter.on(EZUIKit.EZUIKitPlayer.EVENTS.videoInfo, (info) => {
94+
player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
9595
console.log("videoinfo", info);
9696
});
9797
98-
player.eventEmitter.on(EZUIKit.EZUIKitPlayer.EVENTS.audioInfo, (info) => {
98+
player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
9999
console.log("audioInfo", info);
100100
});
101101
102102
// 首帧渲染成功
103103
// first frame display
104104
player.eventEmitter.on(
105-
EZUIKit.EZUIKitPlayer.EVENTS.firstFrameDisplay,
105+
EZUIKitPlayer.EVENTS.firstFrameDisplay,
106106
() => {
107107
console.log("firstFrameDisplay ");
108108
}
109109
);
110110
player.eventEmitter.on(
111-
EZUIKit.EZUIKitPlayer.EVENTS.streamInfoCB,
111+
EZUIKitPlayer.EVENTS.streamInfoCB,
112112
(info) => {
113113
console.log("streamInfoCB ", info);
114114
}

demos/with-vue2.6/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
### esm
3+
`vue.config.js`
4+
5+
```js
6+
// vue.config.js
7+
module.exports = {
8+
// 该对象将会被 webpack-merge 合并入最终的 webpack 配置。
9+
// 文档:https://cli.vuejs.org/zh/guide/webpack.html
10+
configureWebpack: {
11+
module: {
12+
rules: [
13+
// 支持 node_modules 下 mjs
14+
{
15+
test: /\.mjs$/,
16+
include: /node_modules/,
17+
type: "javascript/auto",
18+
},
19+
],
20+
},
21+
},
22+
};
23+
24+
```

demos/with-vue2.6/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@
99
"lint": "vue-cli-service lint"
1010
},
1111
"dependencies": {
12-
"ezuikit-js": "^8.1.9-beta.3",
12+
"ezuikit-js": "^8.1.10-beta.1",
1313
"core-js": "^3.18.1",
1414
"vue": "2.6.14"
1515
},
1616
"devDependencies": {
1717
"@vue/cli-plugin-babel": "4.5.13",
1818
"@vue/cli-service": "4.5.13",
1919
"vue-template-compiler": "2.6.14"
20-
},
21-
"browserslist": [
22-
"> 1%",
23-
"last 2 versions",
24-
"not dead"
25-
]
20+
}
2621
}

demos/with-vue2.6/pnpm-lock.yaml

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

demos/with-vue2.6/public/index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<!DOCTYPE html>
2-
<html lang="">
2+
<html lang="en">
33
<head>
4-
<meta charset="utf-8" />
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
88
<title><%= htmlWebpackPlugin.options.title %></title>
99
</head>
1010
<body>
11-
<noscript> </noscript>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
1214
<div id="app"></div>
1315
<!-- built files will be auto injected -->
1416
</body>

demos/with-vue2.6/src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<div id="app"></div>
2+
<div id="app">
3+
<Player />
4+
</div>
35
</template>
46
<script>
57
import Player from "./components/Player.vue";

demos/with-vue2.6/src/components/Player.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="hello-ezuikit-js">
2+
<div class="ezuikit-js">
33
<div>
44
<div id="video-container" style="width: 600px; height: 400px"></div>
55
</div>
@@ -22,7 +22,7 @@
2222
</template>
2323

2424
<script>
25-
import EZUIKit from "ezuikit-js";
25+
import { EZUIKitPlayer } from "ezuikit-js";
2626
var player = null;
2727
2828
export default {
@@ -45,7 +45,7 @@ export default {
4545
// var accessToken = res.data.accessToken;
4646
4747
// });
48-
player = new EZUIKit.EZUIKitPlayer({
48+
player = new EZUIKitPlayer({
4949
id: "video-container", // 视频容器ID
5050
accessToken:
5151
"at.d525oyj8d7bwohb40ssn3266cfq2mwi2-8hgpypehn9-1fafaty-ea2fxbc1k",
@@ -85,24 +85,24 @@ export default {
8585
streamInfoCBType: 1,
8686
});
8787
88-
player.eventEmitter.on(EZUIKit.EZUIKitPlayer.EVENTS.videoInfo, (info) => {
88+
player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
8989
console.log("videoinfo", info);
9090
});
9191
92-
player.eventEmitter.on(EZUIKit.EZUIKitPlayer.EVENTS.audioInfo, (info) => {
92+
player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
9393
console.log("audioInfo", info);
9494
});
9595
9696
// 首帧渲染成功
9797
// first frame display
9898
player.eventEmitter.on(
99-
EZUIKit.EZUIKitPlayer.EVENTS.firstFrameDisplay,
99+
EZUIKitPlayer.EVENTS.firstFrameDisplay,
100100
() => {
101101
console.log("firstFrameDisplay ");
102102
}
103103
);
104104
player.eventEmitter.on(
105-
EZUIKit.EZUIKitPlayer.EVENTS.streamInfoCB,
105+
EZUIKitPlayer.EVENTS.streamInfoCB,
106106
(info) => {
107107
console.log("streamInfoCB ", info);
108108
}

demos/with-vue2.6/src/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Vue from "vue";
22
import App from "./App.vue";
33

4+
Vue.config.productionTip = false
5+
46
new Vue({
57
render: (h) => h(App),
68
}).$mount("#app");

0 commit comments

Comments
 (0)