ezuikit-js 0.7.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demos/EZUIKitHD/EZUIKitHD.html +171 -0
- package/demos/EZUIKitHD/js/jsWebControl-1.0.0.min.js +80 -0
- package/demos/base-demo/base.html +116 -116
- package/demos/base-demo/ezuikit.js +29 -29
- package/demos/base-demo/ezuikit_static/v65/v1/js/SuperRender_10.js +394 -394
- package/demos/base-demo/ezuikit_static/v65/v1/js/playctrl/DecodeWorker.js +617 -617
- package/demos/base-demo/ezuikit_static/v65/v1/js/playctrl/JSPlaySDKInterface.js +2052 -2052
- package/demos/base-demo/ezuikit_static/v65/v1/js/playctrl/SuperRender_10.js +395 -395
- package/demos/base-demo/ezuikit_static/v65/v1/js/transform/SystemTransform.js +22 -22
- package/demos/base-demo/ezuikit_static/v65/v1/js/tts-v4.js +346 -346
- package/demos/base-demo/ezuikit_static/v65/v1/rec/jquery.min.js +1 -1
- package/demos/base-demo/ezuikit_static/v65/v1/talk/tts-v4.js +346 -346
- package/demos/base-demo/ezuikit_static/v65/v2/rec/jquery.min.js +1 -1
- package/demos/base-demo/ezuikit_static/v65/v2/talk/tts-v4.js +343 -343
- package/demos/base-demo/hls.html +23 -23
- package/demos/base-demo/index.html +116 -116
- package/demos/base-demo/localDecoder.html +117 -117
- package/demos/base-demo/mobileLive.html +116 -116
- package/demos/base-demo/mobileRec.html +115 -115
- package/demos/base-demo/multi.html +128 -128
- package/demos/base-demo/pcLive.html +116 -116
- package/demos/base-demo/pcRec.html +115 -115
- package/demos/base-demo/template.html +123 -123
- package/demos/base-demo/themeData.html +231 -231
- package/demos/nginx-demo/conf/fastcgi.conf +26 -26
- package/demos/nginx-demo/conf/fastcgi_params +25 -25
- package/demos/nginx-demo/conf/koi-utf +109 -109
- package/demos/nginx-demo/conf/koi-win +103 -103
- package/demos/nginx-demo/conf/mime.types +95 -95
- package/demos/nginx-demo/conf/nginx.conf +121 -121
- package/demos/nginx-demo/conf/scgi_params +17 -17
- package/demos/nginx-demo/conf/uwsgi_params +17 -17
- package/demos/nginx-demo/conf/win-utf +126 -126
- package/demos/nginx-demo/contrib/README +21 -21
- package/demos/nginx-demo/contrib/geo2nginx.pl +58 -58
- package/demos/nginx-demo/contrib/unicode2nginx/koi-utf +131 -131
- package/demos/nginx-demo/contrib/unicode2nginx/unicode-to-nginx.pl +48 -48
- package/demos/nginx-demo/contrib/unicode2nginx/win-utf +130 -130
- package/demos/nginx-demo/contrib/vim/ftdetect/nginx.vim +4 -4
- package/demos/nginx-demo/contrib/vim/ftplugin/nginx.vim +1 -1
- package/demos/nginx-demo/contrib/vim/indent/nginx.vim +11 -11
- package/demos/nginx-demo/contrib/vim/syntax/nginx.vim +2268 -2268
- package/demos/nginx-demo/docs/CHANGES +8115 -8115
- package/demos/nginx-demo/docs/CHANGES.ru +8252 -8252
- package/demos/nginx-demo/docs/LICENSE +26 -26
- package/demos/nginx-demo/docs/OpenSSL.LICENSE +127 -127
- package/demos/nginx-demo/docs/PCRE.LICENCE +93 -93
- package/demos/nginx-demo/docs/README +3 -3
- package/demos/nginx-demo/docs/zlib.LICENSE +20 -20
- package/demos/nginx-demo/html/50x.html +21 -21
- package/demos/nginx-demo/html/ezuikit5/ezuikit.js +29 -29
- package/demos/nginx-demo/html/ezuikit5/index.html +116 -116
- package/demos/nginx-demo/html/ezuikit5/server.js +67 -67
- package/demos/nginx-demo/html/index.html +16 -16
- package/demos/nginx-demo/html/js/adapeter.js +5496 -5496
- package/demos/nginx-demo/html/js/janus.js +3507 -3507
- package/demos/nginx-demo/html/js/jquery.min.js +1 -1
- package/demos/nginx-demo/html/js/sts.js +340 -340
- package/demos/nginx-demo/logs/access.log +109 -109
- package/demos/nginx-demo/logs/error.log +15 -15
- package/demos/nginx-demo/logs/nginx.pid +1 -1
- package/demos/react-demo/README.md +68 -68
- package/demos/react-demo/package.json +36 -36
- package/demos/react-demo/public/index.html +43 -43
- package/demos/react-demo/public/manifest.json +25 -25
- package/demos/react-demo/public/robots.txt +3 -3
- package/demos/react-demo/src/App.css +38 -38
- package/demos/react-demo/src/App.js +114 -114
- package/demos/react-demo/src/App.test.js +9 -9
- package/demos/react-demo/src/index.css +13 -13
- package/demos/react-demo/src/index.js +17 -17
- package/demos/react-demo/src/logo.svg +7 -7
- package/demos/react-demo/src/serviceWorker.js +141 -141
- package/demos/react-demo/src/setupTests.js +5 -5
- package/demos/vue-demo/README.md +24 -24
- package/demos/vue-demo/babel.config.js +5 -5
- package/demos/vue-demo/package.json +43 -43
- package/demos/vue-demo/public/index.html +17 -17
- package/demos/vue-demo/src/App.vue +27 -27
- package/demos/vue-demo/src/components/EZUIKitJs.vue +115 -115
- package/demos/vue-demo/src/main.js +8 -8
- package/ezuikit.js +9785 -681
- package/ezuikit_static/v65/v1/js/SuperRender_10.js +394 -394
- package/ezuikit_static/v65/v1/js/playctrl/DecodeWorker.js +617 -617
- package/ezuikit_static/v65/v1/js/playctrl/JSPlaySDKInterface.js +2052 -2052
- package/ezuikit_static/v65/v1/js/playctrl/SuperRender_10.js +395 -395
- package/ezuikit_static/v65/v1/js/transform/SystemTransform.js +22 -22
- package/ezuikit_static/v65/v1/js/tts-v4.js +346 -346
- package/ezuikit_static/v65/v1/rec/jquery.min.js +1 -1
- package/ezuikit_static/v65/v1/talk/tts-v4.js +346 -346
- package/ezuikit_static/v65/v2/js/jsPluginV2-2.0.1.min.js +74 -11
- package/ezuikit_static/v65/v2/rec/jquery.min.js +1 -1
- package/ezuikit_static/v65/v2/talk/tts-v4.js +343 -343
- package/package.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<meta
|
|
9
|
-
name="description"
|
|
10
|
-
content="Web site created using create-react-app"
|
|
11
|
-
/>
|
|
12
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
-
<!--
|
|
14
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
-
-->
|
|
17
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
-
<!--
|
|
19
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
-
|
|
23
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
-
-->
|
|
27
|
-
<title>React App</title>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
-
<div id="root"></div>
|
|
32
|
-
<!--
|
|
33
|
-
This HTML file is a template.
|
|
34
|
-
If you open it directly in the browser, you will see an empty page.
|
|
35
|
-
|
|
36
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
-
|
|
39
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
-
-->
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<title>React App</title>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
+
<div id="root"></div>
|
|
32
|
+
<!--
|
|
33
|
+
This HTML file is a template.
|
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
|
35
|
+
|
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
+
|
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
+
-->
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
-
User-agent: *
|
|
3
|
-
Disallow:
|
|
1
|
+
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
+
User-agent: *
|
|
3
|
+
Disallow:
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
.App {
|
|
2
|
-
text-align: center;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.App-logo {
|
|
6
|
-
height: 40vmin;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
-
.App-logo {
|
|
12
|
-
animation: App-logo-spin infinite 20s linear;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.App-header {
|
|
17
|
-
background-color: #282c34;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
font-size: calc(10px + 2vmin);
|
|
24
|
-
color: white;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.App-link {
|
|
28
|
-
color: #61dafb;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes App-logo-spin {
|
|
32
|
-
from {
|
|
33
|
-
transform: rotate(0deg);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
transform: rotate(360deg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
height: 40vmin;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
+
.App-logo {
|
|
12
|
+
animation: App-logo-spin infinite 20s linear;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.App-header {
|
|
17
|
+
background-color: #282c34;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
font-size: calc(10px + 2vmin);
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.App-link {
|
|
28
|
+
color: #61dafb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes App-logo-spin {
|
|
32
|
+
from {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import EZUIKit from 'ezuikit-js';
|
|
3
|
-
|
|
4
|
-
import './App.css';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class App extends React.Component{
|
|
8
|
-
constructor(props){
|
|
9
|
-
super(props);
|
|
10
|
-
this.player = null; //定义播放器
|
|
11
|
-
}
|
|
12
|
-
componentDidMount(){
|
|
13
|
-
fetch('https://open.ys7.com/jssdk/ezopen/demo/token')
|
|
14
|
-
.then(response => response.json())
|
|
15
|
-
.then(res => {
|
|
16
|
-
var accessToken = res.data.accessToken;
|
|
17
|
-
this.player = new EZUIKit.EZUIKitPlayer({
|
|
18
|
-
id: 'video-container', // 视频容器ID
|
|
19
|
-
accessToken: accessToken,
|
|
20
|
-
url: 'ezopen://open.ys7.com/G39444019/1.live',
|
|
21
|
-
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
|
22
|
-
//template: 'simple',
|
|
23
|
-
plugin: ['talk'], // 加载插件,talk-对讲
|
|
24
|
-
width: 600,
|
|
25
|
-
height: 400,
|
|
26
|
-
});
|
|
27
|
-
window.player = this.player;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
play = () => {
|
|
31
|
-
var playPromise = this.player.play();
|
|
32
|
-
playPromise.then((data) => {
|
|
33
|
-
console.log("promise 获取 数据", data)
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
stop = () => {
|
|
37
|
-
var stopPromise = this.player.stop();
|
|
38
|
-
stopPromise.then((data) => {
|
|
39
|
-
console.log("promise 获取 数据", data)
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
getOSDTime = () => {
|
|
43
|
-
var getOSDTimePromise = this.player.getOSDTime();
|
|
44
|
-
getOSDTimePromise.then((data) => {
|
|
45
|
-
console.log("promise 获取 数据", data)
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
capturePicture = () => {
|
|
49
|
-
var capturePicturePromise = this.player.capturePicture(`${new Date().getTime()}`);
|
|
50
|
-
capturePicturePromise.then((data) => {
|
|
51
|
-
console.log("promise 获取 数据", data)
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
openSound = () => {
|
|
55
|
-
var openSoundPromise = this.player.openSound();
|
|
56
|
-
openSoundPromise.then((data) => {
|
|
57
|
-
console.log("promise 获取 数据", data)
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
closeSound = () => {
|
|
61
|
-
var openSoundPromise = this.player.closeSound();
|
|
62
|
-
openSoundPromise.then((data) => {
|
|
63
|
-
console.log("promise 获取 数据", data)
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
startSave = () => {
|
|
67
|
-
var startSavePromise = this.player.startSave(`${new Date().getTime()}`);
|
|
68
|
-
startSavePromise.then((data) => {
|
|
69
|
-
console.log("promise 获取 数据", data)
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
stopSave = () => {
|
|
73
|
-
var stopSavePromise = this.player.stopSave();
|
|
74
|
-
stopSavePromise.then((data) => {
|
|
75
|
-
console.log("promise 获取 数据", data)
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
ezopenStartTalk = () => {
|
|
79
|
-
this.player.startTalk();
|
|
80
|
-
}
|
|
81
|
-
ezopenStopTalk = () => {
|
|
82
|
-
this.player.stopTalk();
|
|
83
|
-
}
|
|
84
|
-
fullScreen = () => {
|
|
85
|
-
this.player.fullScreen();
|
|
86
|
-
}
|
|
87
|
-
render(){
|
|
88
|
-
return(
|
|
89
|
-
<div className="demo">
|
|
90
|
-
<h2>视频模式使用示例:</h2>
|
|
91
|
-
<div id="video-container"
|
|
92
|
-
style={{width:600,height:600}}
|
|
93
|
-
>
|
|
94
|
-
</div>
|
|
95
|
-
<div>
|
|
96
|
-
<button onClick={()=> this.stop()}>stop</button>
|
|
97
|
-
<button onClick={()=> this.play()}>play</button>
|
|
98
|
-
<button onClick={()=> this.openSound()}>openSound</button>
|
|
99
|
-
<button onClick={()=> this.closeSound()}>closeSound</button>
|
|
100
|
-
<button onClick={()=> this.startSave()}>startSave</button>
|
|
101
|
-
<button onClick={()=> this.stopSave()}>stopSave</button>
|
|
102
|
-
<button onClick={()=> this.capturePicture()}>capturePicture</button>
|
|
103
|
-
<button onClick={()=> this.fullScreen()}>fullScreen</button>
|
|
104
|
-
<button onClick={()=> this.getOSDTime()}>getOSDTime</button>
|
|
105
|
-
<button onClick={()=> this.ezopenStartTalk()}>开始对讲</button>
|
|
106
|
-
<button onClick={()=> this.ezopenStopTalk()}>结束对讲</button>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
export default App;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import EZUIKit from 'ezuikit-js';
|
|
3
|
+
|
|
4
|
+
import './App.css';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class App extends React.Component{
|
|
8
|
+
constructor(props){
|
|
9
|
+
super(props);
|
|
10
|
+
this.player = null; //定义播放器
|
|
11
|
+
}
|
|
12
|
+
componentDidMount(){
|
|
13
|
+
fetch('https://open.ys7.com/jssdk/ezopen/demo/token')
|
|
14
|
+
.then(response => response.json())
|
|
15
|
+
.then(res => {
|
|
16
|
+
var accessToken = res.data.accessToken;
|
|
17
|
+
this.player = new EZUIKit.EZUIKitPlayer({
|
|
18
|
+
id: 'video-container', // 视频容器ID
|
|
19
|
+
accessToken: accessToken,
|
|
20
|
+
url: 'ezopen://open.ys7.com/G39444019/1.live',
|
|
21
|
+
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
|
22
|
+
//template: 'simple',
|
|
23
|
+
plugin: ['talk'], // 加载插件,talk-对讲
|
|
24
|
+
width: 600,
|
|
25
|
+
height: 400,
|
|
26
|
+
});
|
|
27
|
+
window.player = this.player;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
play = () => {
|
|
31
|
+
var playPromise = this.player.play();
|
|
32
|
+
playPromise.then((data) => {
|
|
33
|
+
console.log("promise 获取 数据", data)
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
stop = () => {
|
|
37
|
+
var stopPromise = this.player.stop();
|
|
38
|
+
stopPromise.then((data) => {
|
|
39
|
+
console.log("promise 获取 数据", data)
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
getOSDTime = () => {
|
|
43
|
+
var getOSDTimePromise = this.player.getOSDTime();
|
|
44
|
+
getOSDTimePromise.then((data) => {
|
|
45
|
+
console.log("promise 获取 数据", data)
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
capturePicture = () => {
|
|
49
|
+
var capturePicturePromise = this.player.capturePicture(`${new Date().getTime()}`);
|
|
50
|
+
capturePicturePromise.then((data) => {
|
|
51
|
+
console.log("promise 获取 数据", data)
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
openSound = () => {
|
|
55
|
+
var openSoundPromise = this.player.openSound();
|
|
56
|
+
openSoundPromise.then((data) => {
|
|
57
|
+
console.log("promise 获取 数据", data)
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
closeSound = () => {
|
|
61
|
+
var openSoundPromise = this.player.closeSound();
|
|
62
|
+
openSoundPromise.then((data) => {
|
|
63
|
+
console.log("promise 获取 数据", data)
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
startSave = () => {
|
|
67
|
+
var startSavePromise = this.player.startSave(`${new Date().getTime()}`);
|
|
68
|
+
startSavePromise.then((data) => {
|
|
69
|
+
console.log("promise 获取 数据", data)
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
stopSave = () => {
|
|
73
|
+
var stopSavePromise = this.player.stopSave();
|
|
74
|
+
stopSavePromise.then((data) => {
|
|
75
|
+
console.log("promise 获取 数据", data)
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
ezopenStartTalk = () => {
|
|
79
|
+
this.player.startTalk();
|
|
80
|
+
}
|
|
81
|
+
ezopenStopTalk = () => {
|
|
82
|
+
this.player.stopTalk();
|
|
83
|
+
}
|
|
84
|
+
fullScreen = () => {
|
|
85
|
+
this.player.fullScreen();
|
|
86
|
+
}
|
|
87
|
+
render(){
|
|
88
|
+
return(
|
|
89
|
+
<div className="demo">
|
|
90
|
+
<h2>视频模式使用示例:</h2>
|
|
91
|
+
<div id="video-container"
|
|
92
|
+
style={{width:600,height:600}}
|
|
93
|
+
>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<button onClick={()=> this.stop()}>stop</button>
|
|
97
|
+
<button onClick={()=> this.play()}>play</button>
|
|
98
|
+
<button onClick={()=> this.openSound()}>openSound</button>
|
|
99
|
+
<button onClick={()=> this.closeSound()}>closeSound</button>
|
|
100
|
+
<button onClick={()=> this.startSave()}>startSave</button>
|
|
101
|
+
<button onClick={()=> this.stopSave()}>stopSave</button>
|
|
102
|
+
<button onClick={()=> this.capturePicture()}>capturePicture</button>
|
|
103
|
+
<button onClick={()=> this.fullScreen()}>fullScreen</button>
|
|
104
|
+
<button onClick={()=> this.getOSDTime()}>getOSDTime</button>
|
|
105
|
+
<button onClick={()=> this.ezopenStartTalk()}>开始对讲</button>
|
|
106
|
+
<button onClick={()=> this.ezopenStopTalk()}>结束对讲</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
export default App;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import App from './App';
|
|
4
|
-
|
|
5
|
-
test('renders learn react link', () => {
|
|
6
|
-
const { getByText } = render(<App />);
|
|
7
|
-
const linkElement = getByText(/learn react/i);
|
|
8
|
-
expect(linkElement).toBeInTheDocument();
|
|
9
|
-
});
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import App from './App';
|
|
4
|
+
|
|
5
|
+
test('renders learn react link', () => {
|
|
6
|
+
const { getByText } = render(<App />);
|
|
7
|
+
const linkElement = getByText(/learn react/i);
|
|
8
|
+
expect(linkElement).toBeInTheDocument();
|
|
9
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
-
sans-serif;
|
|
6
|
-
-webkit-font-smoothing: antialiased;
|
|
7
|
-
-moz-osx-font-smoothing: grayscale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
code {
|
|
11
|
-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
-
monospace;
|
|
13
|
-
}
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
+
sans-serif;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
code {
|
|
11
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
+
monospace;
|
|
13
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import App from './App';
|
|
5
|
-
import * as serviceWorker from './serviceWorker';
|
|
6
|
-
|
|
7
|
-
ReactDOM.render(
|
|
8
|
-
<React.StrictMode>
|
|
9
|
-
<App />
|
|
10
|
-
</React.StrictMode>,
|
|
11
|
-
document.getElementById('root')
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// If you want your app to work offline and load faster, you can change
|
|
15
|
-
// unregister() to register() below. Note this comes with some pitfalls.
|
|
16
|
-
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
17
|
-
serviceWorker.unregister();
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import * as serviceWorker from './serviceWorker';
|
|
6
|
+
|
|
7
|
+
ReactDOM.render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<App />
|
|
10
|
+
</React.StrictMode>,
|
|
11
|
+
document.getElementById('root')
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
// If you want your app to work offline and load faster, you can change
|
|
15
|
+
// unregister() to register() below. Note this comes with some pitfalls.
|
|
16
|
+
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
17
|
+
serviceWorker.unregister();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
|
|
2
|
-
<g fill="#61DAFB">
|
|
3
|
-
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
|
|
4
|
-
<circle cx="420.9" cy="296.5" r="45.7"/>
|
|
5
|
-
<path d="M520.5 78.1z"/>
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
|
|
2
|
+
<g fill="#61DAFB">
|
|
3
|
+
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
|
|
4
|
+
<circle cx="420.9" cy="296.5" r="45.7"/>
|
|
5
|
+
<path d="M520.5 78.1z"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|