trtc-cloud-js-sdk 2.0.0 → 2.1.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/package.json +7 -57
- package/trtc-cloud-js-sdk.js +1 -0
- package/.eslintrc.js +0 -88
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -58
- package/build/jsdoc/clean-doc.js +0 -12
- package/build/jsdoc/fix-doc.js +0 -141
- package/build/jsdoc/jsdoc.json +0 -42
- package/build/package-bundle.js +0 -29
- package/build/rollup.config.dev.js +0 -88
- package/build/rollup.config.prod.js +0 -93
- package/build/rollup.js +0 -359
- package/build/template/npm-package/package.json +0 -24
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/base.css +0 -213
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/index.html +0 -80
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/prettify.css +0 -1
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/prettify.js +0 -1
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/sort-arrow-sprite.png +0 -0
- package/coverage/Chrome 103.0.5060 (Mac OS X 10.15.7)/sorter.js +0 -158
- package/examples/apiExample/.env +0 -2
- package/examples/apiExample/README.md +0 -70
- package/examples/apiExample/package-lock.json +0 -30915
- package/examples/apiExample/package.json +0 -51
- package/examples/apiExample/public/audio.js +0 -195
- package/examples/apiExample/public/audio.js.map +0 -7
- package/examples/apiExample/public/av_processing.js +0 -1
- package/examples/apiExample/public/basic/av_processing.wasm +0 -0
- package/examples/apiExample/public/basic/worker.js +0 -10434
- package/examples/apiExample/public/favicon.ico +0 -0
- package/examples/apiExample/public/index.html +0 -47
- package/examples/apiExample/public/logo192.png +0 -0
- package/examples/apiExample/public/logo512.png +0 -0
- package/examples/apiExample/public/manifest.json +0 -25
- package/examples/apiExample/public/robots.txt +0 -3
- package/examples/apiExample/src/App.css +0 -37
- package/examples/apiExample/src/App.js +0 -25
- package/examples/apiExample/src/api/http.js +0 -127
- package/examples/apiExample/src/api/nav.js +0 -44
- package/examples/apiExample/src/components/BasicInfoComponent.css +0 -16
- package/examples/apiExample/src/components/BasicInfoComponent.js +0 -27
- package/examples/apiExample/src/config/gen-test-user-sig.js +0 -64
- package/examples/apiExample/src/config/lib-generate-test-usersig.min.js +0 -7052
- package/examples/apiExample/src/config/nav.js +0 -136
- package/examples/apiExample/src/home.js +0 -16
- package/examples/apiExample/src/index.css +0 -21
- package/examples/apiExample/src/index.js +0 -12
- package/examples/apiExample/src/logo.svg +0 -1
- package/examples/apiExample/src/page/basic/screen-share/index.css +0 -52
- package/examples/apiExample/src/page/basic/screen-share/index.js +0 -223
- package/examples/apiExample/src/page/basic/setDevice/index.js +0 -262
- package/examples/apiExample/src/page/basic/setDevice/index.scss +0 -93
- package/examples/apiExample/src/page/basic/video-call/index.js +0 -521
- package/examples/apiExample/src/page/basic/video-call/index.scss +0 -93
- package/examples/apiExample/src/page/basic/video-call-init/index.js +0 -382
- package/examples/apiExample/src/page/basic/video-call-init/index.scss +0 -93
- package/examples/apiExample/src/page/basic/video-live/index.css +0 -37
- package/examples/apiExample/src/page/basic/video-live/index.js +0 -188
- package/examples/apiExample/src/page/layout.js +0 -22
- package/examples/apiExample/src/page/layout.scss +0 -76
- package/examples/apiExample/src/utils/utils.js +0 -35
- package/examples/jsExample/assets/css/bootstrap-material-design.css +0 -12169
- package/examples/jsExample/assets/css/bootstrap-material-design.min.css +0 -8
- package/examples/jsExample/assets/css/common.css +0 -48
- package/examples/jsExample/assets/icon/iconfont.js +0 -1
- package/examples/jsExample/assets/js/bootstrap-material-design.js +0 -6939
- package/examples/jsExample/assets/js/bootstrap-material-design.js.map +0 -1
- package/examples/jsExample/assets/js/bootstrap-material-design.min.js +0 -1
- package/examples/jsExample/assets/js/graph.js +0 -695
- package/examples/jsExample/assets/js/jquery-3.2.1.min.js +0 -4
- package/examples/jsExample/assets/js/jquery-3.2.1.slim.min.js +0 -4
- package/examples/jsExample/assets/js/lib-generate-test-usersig.min.js +0 -2
- package/examples/jsExample/assets/js/popper.js +0 -2442
- package/examples/jsExample/index.html +0 -57
- package/examples/jsExample/rtc/css/common.css +0 -82
- package/examples/jsExample/rtc/index.html +0 -107
- package/examples/jsExample/rtc/js/index.js +0 -142
- package/examples/vueDemo/LICENSE +0 -21
- package/examples/vueDemo/README.md +0 -144
- package/examples/vueDemo/README_EN.md +0 -136
- package/examples/vueDemo/av_processing.wasm +0 -0
- package/examples/vueDemo/index.html +0 -23
- package/examples/vueDemo/package-lock.json +0 -1375
- package/examples/vueDemo/package.json +0 -36
- package/examples/vueDemo/src/App.vue +0 -12
- package/examples/vueDemo/src/api/index.js +0 -59
- package/examples/vueDemo/src/assets/css/color-dark.css +0 -28
- package/examples/vueDemo/src/assets/css/icon.css +0 -4
- package/examples/vueDemo/src/assets/css/main.css +0 -177
- package/examples/vueDemo/src/assets/img/img.jpg +0 -0
- package/examples/vueDemo/src/assets/img/login-bg.jpg +0 -0
- package/examples/vueDemo/src/components/Header.vue +0 -172
- package/examples/vueDemo/src/components/Sidebar.vue +0 -117
- package/examples/vueDemo/src/components/Tags.vue +0 -174
- package/examples/vueDemo/src/components/tendency.vue +0 -206
- package/examples/vueDemo/src/components/trtc/main-menu.vue +0 -50
- package/examples/vueDemo/src/components/trtc/nav-bar.vue +0 -53
- package/examples/vueDemo/src/components/trtc/show-screen-capture.vue +0 -118
- package/examples/vueDemo/src/components/trtc/trtc-state-check.vue +0 -117
- package/examples/vueDemo/src/config/gen-test-user-sig.js +0 -67
- package/examples/vueDemo/src/config/lib-generate-test-usersig.min.js +0 -7052
- package/examples/vueDemo/src/main.js +0 -11
- package/examples/vueDemo/src/plugins/element.js +0 -17
- package/examples/vueDemo/src/router/index.js +0 -73
- package/examples/vueDemo/src/store/sidebar.js +0 -17
- package/examples/vueDemo/src/store/tags.js +0 -48
- package/examples/vueDemo/src/utils/i18n.js +0 -24
- package/examples/vueDemo/src/utils/request.js +0 -34
- package/examples/vueDemo/src/utils/utils.js +0 -35
- package/examples/vueDemo/src/views/Home.vue +0 -46
- package/examples/vueDemo/src/views/I18n.vue +0 -40
- package/examples/vueDemo/src/views/Icon.vue +0 -229
- package/examples/vueDemo/src/views/basic/trtc.vue +0 -194
- package/examples/vueDemo/src/views/feature/index.vue +0 -259
- package/examples/vueDemo/src/views/github/index.vue +0 -243
- package/examples/vueDemo/src/views/improve/live-index.vue +0 -256
- package/examples/vueDemo/src/views/improve/live-room-anchor.vue +0 -689
- package/examples/vueDemo/src/views/improve/live-room-audience.vue +0 -383
- package/examples/vueDemo/src/views/sdkAppId/index.vue +0 -284
- package/examples/vueDemo/vite.config.js +0 -18
- package/examples/vueDemo/worker.js +0 -22
- package/karma.conf.js +0 -99
- package/scripts/publish.js +0 -86
- package/src/Camera.ts +0 -80
- package/src/Mic.ts +0 -145
- package/src/common/IError.ts +0 -6
- package/src/common/ITRTCCloud.ts +0 -68
- package/src/common/constants.ts +0 -116
- package/src/common/trtc-code.ts +0 -43
- package/src/common/trtc-define.ts +0 -1007
- package/src/common/trtc-event.ts +0 -29
- package/src/index.ts +0 -1672
- package/src/utils/environment.js +0 -297
- package/src/utils/raf.js +0 -131
- package/src/utils/time.js +0 -22
- package/src/utils/utils.ts +0 -71
- package/src/utils/uuid.js +0 -12
- package/test/unit/env.test.js +0 -25
- package/test/unit/get-user-media.test.js +0 -40
- package/test/unit/ice-parser.test.js +0 -23
- package/test/unit/sdp.test.js +0 -45
- package/test/unit/signal.test.js +0 -78
- package/tsconfig.json +0 -32
- /package/{build/template/npm-package/README.md → README.md} +0 -0
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tags" v-if="tags.show">
|
|
3
|
-
<ul>
|
|
4
|
-
<li class="tags-li" v-for="(item,index) in tags.list" :class="{'active': isActive(item.path)}" :key="index">
|
|
5
|
-
<router-link :to="item.path" class="tags-li-title">{{item.title}}</router-link>
|
|
6
|
-
<span class="tags-li-icon" @click="closeTags(index)">
|
|
7
|
-
<i class="el-icon-close"></i>
|
|
8
|
-
</span>
|
|
9
|
-
</li>
|
|
10
|
-
</ul>
|
|
11
|
-
<div class="tags-close-box">
|
|
12
|
-
<el-dropdown @command="handleTags">
|
|
13
|
-
<el-button size="mini" type="primary">
|
|
14
|
-
标签选项
|
|
15
|
-
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
16
|
-
</el-button>
|
|
17
|
-
<template #dropdown>
|
|
18
|
-
<el-dropdown-menu size="small">
|
|
19
|
-
<el-dropdown-item command="other">关闭其他</el-dropdown-item>
|
|
20
|
-
<el-dropdown-item command="all">关闭所有</el-dropdown-item>
|
|
21
|
-
</el-dropdown-menu>
|
|
22
|
-
</template>
|
|
23
|
-
</el-dropdown>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import { useTagsStore } from '../store/tags'
|
|
30
|
-
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
|
|
31
|
-
export default {
|
|
32
|
-
setup() {
|
|
33
|
-
const route = useRoute();
|
|
34
|
-
const router = useRouter();
|
|
35
|
-
const isActive = (path) => {
|
|
36
|
-
return path === route.fullPath;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const tags = useTagsStore();
|
|
40
|
-
// 关闭单个标签
|
|
41
|
-
const closeTags = (index) => {
|
|
42
|
-
const delItem = tags.list[index];
|
|
43
|
-
tags.delTagsItem(index);
|
|
44
|
-
const item = tags.list[index] ? tags.list[index] : tags.list[index - 1];
|
|
45
|
-
if (item) {
|
|
46
|
-
delItem.path === route.fullPath && router.push(item.path);
|
|
47
|
-
} else {
|
|
48
|
-
router.push("/");
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// 设置标签
|
|
53
|
-
const setTags = (route) => {
|
|
54
|
-
const isExist = tags.list.some((item) => {
|
|
55
|
-
return item.path === route.fullPath;
|
|
56
|
-
});
|
|
57
|
-
if (!isExist) {
|
|
58
|
-
if (tags.list.length >= 8) tags.delTagsItem(0);
|
|
59
|
-
tags.setTagsItem({
|
|
60
|
-
name: route.name,
|
|
61
|
-
title: route.meta.title,
|
|
62
|
-
path: route.fullPath,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
setTags(route);
|
|
67
|
-
onBeforeRouteUpdate((to) => {
|
|
68
|
-
setTags(to);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// 关闭全部标签
|
|
72
|
-
const closeAll = () => {
|
|
73
|
-
tags.clearTags();
|
|
74
|
-
router.push("/");
|
|
75
|
-
};
|
|
76
|
-
// 关闭其他标签
|
|
77
|
-
const closeOther = () => {
|
|
78
|
-
const curItem = tags.list.filter((item) => {
|
|
79
|
-
return item.path === route.fullPath;
|
|
80
|
-
});
|
|
81
|
-
tags.closeTagsOther(curItem);
|
|
82
|
-
};
|
|
83
|
-
const handleTags = (command) => {
|
|
84
|
-
command === "other" ? closeOther() : closeAll();
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// 关闭当前页面的标签页
|
|
88
|
-
// tags.closeCurrentTag({
|
|
89
|
-
// $router: router,
|
|
90
|
-
// $route: route
|
|
91
|
-
// });
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
isActive,
|
|
95
|
-
tags,
|
|
96
|
-
closeTags,
|
|
97
|
-
handleTags,
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<style>
|
|
105
|
-
.tags {
|
|
106
|
-
position: relative;
|
|
107
|
-
height: 30px;
|
|
108
|
-
overflow: hidden;
|
|
109
|
-
background: #fff;
|
|
110
|
-
padding-right: 120px;
|
|
111
|
-
box-shadow: 0 5px 10px #ddd;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.tags ul {
|
|
115
|
-
box-sizing: border-box;
|
|
116
|
-
width: 100%;
|
|
117
|
-
height: 100%;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.tags-li {
|
|
121
|
-
float: left;
|
|
122
|
-
margin: 3px 5px 2px 3px;
|
|
123
|
-
border-radius: 3px;
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
overflow: hidden;
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
height: 23px;
|
|
128
|
-
line-height: 23px;
|
|
129
|
-
border: 1px solid #e9eaec;
|
|
130
|
-
background: #fff;
|
|
131
|
-
padding: 0 5px 0 12px;
|
|
132
|
-
vertical-align: middle;
|
|
133
|
-
color: #666;
|
|
134
|
-
-webkit-transition: all 0.3s ease-in;
|
|
135
|
-
-moz-transition: all 0.3s ease-in;
|
|
136
|
-
transition: all 0.3s ease-in;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.tags-li:not(.active):hover {
|
|
140
|
-
background: #f8f8f8;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.tags-li.active {
|
|
144
|
-
color: #fff;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.tags-li-title {
|
|
148
|
-
float: left;
|
|
149
|
-
max-width: 80px;
|
|
150
|
-
overflow: hidden;
|
|
151
|
-
white-space: nowrap;
|
|
152
|
-
text-overflow: ellipsis;
|
|
153
|
-
margin-right: 5px;
|
|
154
|
-
color: #666;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.tags-li.active .tags-li-title {
|
|
158
|
-
color: #fff;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.tags-close-box {
|
|
162
|
-
position: absolute;
|
|
163
|
-
right: 0;
|
|
164
|
-
top: 0;
|
|
165
|
-
box-sizing: border-box;
|
|
166
|
-
padding-top: 1px;
|
|
167
|
-
text-align: center;
|
|
168
|
-
width: 110px;
|
|
169
|
-
height: 30px;
|
|
170
|
-
background: #fff;
|
|
171
|
-
box-shadow: -3px 0 15px 3px rgba(0, 0, 0, 0.1);
|
|
172
|
-
z-index: 10;
|
|
173
|
-
}
|
|
174
|
-
</style>
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="line1">
|
|
3
|
-
<div :id="domId" class="" style="width: 90%;height:450px;"></div>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import * as echarts from 'echarts/lib/echarts';
|
|
9
|
-
// 引入柱状图
|
|
10
|
-
import 'echarts/lib/chart/bar';
|
|
11
|
-
import 'echarts/lib/chart/line';
|
|
12
|
-
import 'echarts/lib/component/title';
|
|
13
|
-
import 'echarts/lib/component/legend';
|
|
14
|
-
import 'echarts/lib/component/toolbox';
|
|
15
|
-
import 'echarts/lib/component/markPoint';
|
|
16
|
-
import 'echarts/lib/component/tooltip';
|
|
17
|
-
import 'echarts/lib/component/grid';
|
|
18
|
-
export default {
|
|
19
|
-
mounted() {
|
|
20
|
-
this.myChart = echarts.init(document.getElementById(this.domId));
|
|
21
|
-
this.initData();
|
|
22
|
-
},
|
|
23
|
-
props: {
|
|
24
|
-
sevenDate: {
|
|
25
|
-
type: Array,
|
|
26
|
-
default: [],
|
|
27
|
-
},
|
|
28
|
-
sevenDay: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default: [],
|
|
31
|
-
},
|
|
32
|
-
title: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '标题',
|
|
35
|
-
},
|
|
36
|
-
legend: {
|
|
37
|
-
type: Array,
|
|
38
|
-
default: [],
|
|
39
|
-
},
|
|
40
|
-
loading: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false,
|
|
43
|
-
},
|
|
44
|
-
domId: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: 'line1'
|
|
47
|
-
},
|
|
48
|
-
graphType: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: 'line',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
methods: {
|
|
54
|
-
initData() {
|
|
55
|
-
const colors = ['#5793f3', '#675bba', '#d14a61'];
|
|
56
|
-
const option = {
|
|
57
|
-
color: colors,
|
|
58
|
-
title: {
|
|
59
|
-
text: this.title,
|
|
60
|
-
subtext: ''
|
|
61
|
-
},
|
|
62
|
-
tooltip: {
|
|
63
|
-
trigger: 'axis'
|
|
64
|
-
},
|
|
65
|
-
legend: {
|
|
66
|
-
// orient: 'vertical',
|
|
67
|
-
x: 'center',
|
|
68
|
-
y: 'bottom',
|
|
69
|
-
padding: [50, 50, 0, 0],
|
|
70
|
-
data: this.legend,
|
|
71
|
-
},
|
|
72
|
-
toolbox: {
|
|
73
|
-
show: this.graphType !== 'bar' ? true : false,
|
|
74
|
-
feature: {
|
|
75
|
-
dataZoom: {
|
|
76
|
-
yAxisIndex: 'none'
|
|
77
|
-
},
|
|
78
|
-
dataView: { readOnly: false },
|
|
79
|
-
magicType: { type: ['bar', 'line'] },
|
|
80
|
-
restore: {},
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
xAxis: {
|
|
84
|
-
type: 'category',
|
|
85
|
-
boundaryGap: false,
|
|
86
|
-
data: this.sevenDay
|
|
87
|
-
},
|
|
88
|
-
yAxis: [
|
|
89
|
-
{
|
|
90
|
-
type: 'value',
|
|
91
|
-
// name: '用户',
|
|
92
|
-
min: 0,
|
|
93
|
-
// max: 200,
|
|
94
|
-
position: 'left',
|
|
95
|
-
axisLine: {
|
|
96
|
-
lineStyle: {
|
|
97
|
-
color: '#999'
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
axisLabel: {
|
|
101
|
-
formatter: '{value}'
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
type: 'value',
|
|
106
|
-
// name: '订单',
|
|
107
|
-
min: 0,
|
|
108
|
-
// max: 200,
|
|
109
|
-
position: 'right',
|
|
110
|
-
axisLine: {
|
|
111
|
-
lineStyle: {
|
|
112
|
-
color: '#999'
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
axisLabel: {
|
|
116
|
-
formatter: '{value}'
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
series: this.sevenDate.slice(0, 6).map((arr, index) => {
|
|
121
|
-
return {
|
|
122
|
-
name: this.legend[index],
|
|
123
|
-
type: this.graphType,
|
|
124
|
-
data: arr,
|
|
125
|
-
smooth: true, // true 为平滑曲线; false 为直线
|
|
126
|
-
yAxisIndex: 1,
|
|
127
|
-
markPoint: {
|
|
128
|
-
data: this.sevenDate.length > 1 ? [] : [
|
|
129
|
-
{ type: 'max', name: '最大值' },
|
|
130
|
-
{ type: 'min', name: '最小值' }
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
}),
|
|
135
|
-
// series: [
|
|
136
|
-
// {
|
|
137
|
-
// name: '新注册用户',
|
|
138
|
-
// type: 'line',
|
|
139
|
-
// data: this.sevenDate[0],
|
|
140
|
-
// yAxisIndex: 1,
|
|
141
|
-
// markPoint: {
|
|
142
|
-
// data: [
|
|
143
|
-
// { type: 'max', name: '最大值' },
|
|
144
|
-
// { type: 'min', name: '最小值' }
|
|
145
|
-
// ]
|
|
146
|
-
// },
|
|
147
|
-
// },
|
|
148
|
-
// {
|
|
149
|
-
// name: '新增订单',
|
|
150
|
-
// type: 'line',
|
|
151
|
-
// data: this.sevenDate[1],
|
|
152
|
-
// yAxisIndex: 1,
|
|
153
|
-
// markPoint: {
|
|
154
|
-
// data: [
|
|
155
|
-
// { type: 'max', name: '最大值' },
|
|
156
|
-
// { type: 'min', name: '最小值' }
|
|
157
|
-
// ]
|
|
158
|
-
// },
|
|
159
|
-
// },
|
|
160
|
-
// {
|
|
161
|
-
// name: '新增管理员',
|
|
162
|
-
// type: 'line',
|
|
163
|
-
// data: this.sevenDate[2],
|
|
164
|
-
// yAxisIndex: 1,
|
|
165
|
-
// markPoint: {
|
|
166
|
-
// data: [
|
|
167
|
-
// { type: 'max', name: '最大值' },
|
|
168
|
-
// { type: 'min', name: '最小值' }
|
|
169
|
-
// ]
|
|
170
|
-
// },
|
|
171
|
-
// }
|
|
172
|
-
// ]
|
|
173
|
-
};
|
|
174
|
-
this.myChart.clear();
|
|
175
|
-
this.myChart.setOption(option);
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
watch: {
|
|
179
|
-
sevenDate: function () {
|
|
180
|
-
this.initData()
|
|
181
|
-
},
|
|
182
|
-
sevenDay: function () {
|
|
183
|
-
this.initData()
|
|
184
|
-
},
|
|
185
|
-
loading: function (isShowLoading) {
|
|
186
|
-
if (isShowLoading) {
|
|
187
|
-
this.myChart.showLoading({
|
|
188
|
-
title: '加载中',
|
|
189
|
-
mask: true,
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
192
|
-
this.myChart.hideLoading();
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
</script>
|
|
198
|
-
|
|
199
|
-
<style lang="less">
|
|
200
|
-
// @import '../style/mixin';
|
|
201
|
-
|
|
202
|
-
.line1 {
|
|
203
|
-
display: flex;
|
|
204
|
-
justify-content: center;
|
|
205
|
-
}
|
|
206
|
-
</style>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template name="main-menu">
|
|
2
|
-
|
|
3
|
-
<div class="main-menu">
|
|
4
|
-
<ul>
|
|
5
|
-
<li> <router-link to="/trtc-index" > RTC </router-link> </li>
|
|
6
|
-
<li> <router-link to="/live-index/anchor" > LIVE </router-link> </li>
|
|
7
|
-
</ul>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: "main-menu",
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<style scoped>
|
|
18
|
-
.main-menu{
|
|
19
|
-
font-size: 2em;
|
|
20
|
-
}
|
|
21
|
-
.main-menu>ul {
|
|
22
|
-
display: block;
|
|
23
|
-
list-style: none;
|
|
24
|
-
margin: 30vh auto 5vh auto;
|
|
25
|
-
width: 50%;
|
|
26
|
-
padding: 0;
|
|
27
|
-
}
|
|
28
|
-
.main-menu>ul>li {
|
|
29
|
-
margin: 2px 5px;
|
|
30
|
-
height: 2em;
|
|
31
|
-
line-height: 2em;
|
|
32
|
-
text-align: center;
|
|
33
|
-
}
|
|
34
|
-
.main-menu>ul>li>a {
|
|
35
|
-
color: #fff;
|
|
36
|
-
text-decoration: none;
|
|
37
|
-
display: block;
|
|
38
|
-
border-radius: 5px;
|
|
39
|
-
height: 2em;
|
|
40
|
-
line-height: 2em;
|
|
41
|
-
margin: 1em;
|
|
42
|
-
background-color: #007bff;
|
|
43
|
-
}
|
|
44
|
-
.main-menu>ul>li>a:hover {
|
|
45
|
-
background-color: #0069d9;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
48
|
-
<style>
|
|
49
|
-
|
|
50
|
-
</style>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="back-href-container">
|
|
3
|
-
<div class="back-button">
|
|
4
|
-
<router-link :to="href" v-if="href">
|
|
5
|
-
<b-icon-chevron-left color="white"></b-icon-chevron-left>
|
|
6
|
-
</router-link>
|
|
7
|
-
</div>
|
|
8
|
-
<h3 class="title" v-if="title">{{title}}</h3>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
props: {
|
|
18
|
-
href: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: false
|
|
21
|
-
},
|
|
22
|
-
title: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: false
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
</script>
|
|
30
|
-
<style scoped>
|
|
31
|
-
.back-href-container {
|
|
32
|
-
height: 5vh;
|
|
33
|
-
line-height: 5vh;
|
|
34
|
-
background-color: rgba(0,0,0, 0.5);
|
|
35
|
-
}
|
|
36
|
-
.back-button {
|
|
37
|
-
display: inline-block;
|
|
38
|
-
width: 5vw;
|
|
39
|
-
text-align: center;
|
|
40
|
-
font-size: 3vh;
|
|
41
|
-
}
|
|
42
|
-
.title {
|
|
43
|
-
display: inline-block;
|
|
44
|
-
margin: 0px;
|
|
45
|
-
padding: 0px;
|
|
46
|
-
top: 1vh;
|
|
47
|
-
left: 0;
|
|
48
|
-
text-align: center;
|
|
49
|
-
color: #fff;
|
|
50
|
-
width: 90vw;
|
|
51
|
-
font-size: 2vh;
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="screens-list">
|
|
3
|
-
<div class="loading-animation" v-if="list.length===0">
|
|
4
|
-
<b-icon icon="arrow-clockwise" animation="spin" font-scale="2" ></b-icon>
|
|
5
|
-
</div>
|
|
6
|
-
<div v-for="item in list" :key="item.sourceId" :label="item.sourceName" class="screen-info"
|
|
7
|
-
v-bind:data-id="item.sourceId"
|
|
8
|
-
v-bind:data-name="item.sourceName"
|
|
9
|
-
v-bind:data-type="item.type"
|
|
10
|
-
@click="onChoose">
|
|
11
|
-
<canvas :id="['screen_'+item.sourceId]" @onload="onCanvasLoaded"></canvas>
|
|
12
|
-
<p>
|
|
13
|
-
<b-button variant="link"> {{item.sourceName.length > 20 ? item.sourceName.slice(0,20)+'...' : item.sourceName }} </b-button>
|
|
14
|
-
</p>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import Log from '../common/log';
|
|
21
|
-
let logger = new Log('ShowScreenCapture');
|
|
22
|
-
export default {
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
props: {
|
|
30
|
-
list: {
|
|
31
|
-
type: Array,
|
|
32
|
-
required: true
|
|
33
|
-
},
|
|
34
|
-
onClick : {
|
|
35
|
-
type: Function,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
methods: {
|
|
41
|
-
|
|
42
|
-
onChoose (event) {
|
|
43
|
-
try {
|
|
44
|
-
this.onClick(event);
|
|
45
|
-
} catch(err) {
|
|
46
|
-
logger.log('onChoose error:', err);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
onCanvasLoaded(event) {
|
|
51
|
-
logger.log('onCanvasLoaded:', event);
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
renderScreensList() {
|
|
55
|
-
if (this.list.length === 0) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
let {list} = this;
|
|
59
|
-
let srcInfos = null;
|
|
60
|
-
let elId = '';
|
|
61
|
-
let cnvs = null;
|
|
62
|
-
let imgData = null;
|
|
63
|
-
|
|
64
|
-
for (let i = 0; i < list.length; i++) {
|
|
65
|
-
srcInfos = list[i];
|
|
66
|
-
if (srcInfos.thumbBGRA.length===0) continue;
|
|
67
|
-
elId = `screen_${srcInfos.sourceId}`;
|
|
68
|
-
cnvs = document.getElementById(elId);
|
|
69
|
-
cnvs.width = srcInfos.thumbBGRA.width;
|
|
70
|
-
cnvs.height = srcInfos.thumbBGRA.height;
|
|
71
|
-
imgData = new ImageData(new Uint8ClampedArray(srcInfos.thumbBGRA.buffer), srcInfos.thumbBGRA.width, srcInfos.thumbBGRA.height );
|
|
72
|
-
cnvs.getContext("2d").putImageData(imgData, 0, 0);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
mounted() {
|
|
78
|
-
setTimeout(()=>{
|
|
79
|
-
this.renderScreensList.bind(this)();
|
|
80
|
-
}, 0);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<style scoped>
|
|
88
|
-
#screens-list {
|
|
89
|
-
text-align: center;
|
|
90
|
-
align-content: center;
|
|
91
|
-
height:70vh;
|
|
92
|
-
overflow:auto;
|
|
93
|
-
}
|
|
94
|
-
.loading-animation {
|
|
95
|
-
width:100vw;
|
|
96
|
-
height: auto;
|
|
97
|
-
text-align: center;
|
|
98
|
-
}
|
|
99
|
-
.screen-info {
|
|
100
|
-
display: inline-block;
|
|
101
|
-
text-align: center;
|
|
102
|
-
margin: 10px;
|
|
103
|
-
background-color: #fafafa;
|
|
104
|
-
}
|
|
105
|
-
.screen-info>p{
|
|
106
|
-
margin: 0;
|
|
107
|
-
}
|
|
108
|
-
.screen-info>canvas{
|
|
109
|
-
margin: 0;
|
|
110
|
-
}
|
|
111
|
-
.screen-info:hover {
|
|
112
|
-
background-color: #f2f2f2;
|
|
113
|
-
box-shadow: #333 0 0 10px;
|
|
114
|
-
}
|
|
115
|
-
.screen-info {
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
}
|
|
118
|
-
</style>
|