@tencentcloud/trtc-component-wx 0.0.6 → 0.0.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<view class="trtc-player-container">
|
|
2
|
-
<live-player
|
|
2
|
+
<live-player class="trtc-player" id="{{player.streamID}}" data-userid="{{player.userID}}"
|
|
3
3
|
data-streamid="{{player.streamID}}" data-streamtype="{{player.streamType}}" src="{{player.src}}" mode="RTC"
|
|
4
4
|
autoplay="{{player.autoplay}}" mute-audio="{{player.muteAudio}}" mute-video="{{player.muteVideo}}"
|
|
5
5
|
orientation="{{player.orientation}}" object-fit="{{player.objectFit}}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/trtc-component-wx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "miniprogram_dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"webpack-node-externals": "^1.7.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@tencentcloud/trtc-cloud-wx": "^0.0.
|
|
70
|
+
"@tencentcloud/trtc-cloud-wx": "^0.0.7",
|
|
71
71
|
"trtc-wx-sdk": "^1.1.5"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/trtc-player.js
CHANGED
|
@@ -14,10 +14,12 @@ Component({
|
|
|
14
14
|
},
|
|
15
15
|
lifetimes: {
|
|
16
16
|
attached() {
|
|
17
|
+
trtcCloud.logger.info('trtc-player attached', this.data.streamId)
|
|
17
18
|
this.data.TRTCStreamId = this.getTRTCStreamId(this.data.streamId)
|
|
18
19
|
this.bindTRTCCloudEvent()
|
|
19
20
|
},
|
|
20
21
|
detached() {
|
|
22
|
+
trtcCloud.logger.info('trtc-player attached', this.data.streamId)
|
|
21
23
|
this.unbindTRTCCloudEvent()
|
|
22
24
|
}
|
|
23
25
|
},
|
|
@@ -25,6 +27,7 @@ Component({
|
|
|
25
27
|
methods: {
|
|
26
28
|
// todo room uniapp 特供,因为 uniapp 打包导致组件传惨变量名更替 trtc-player 组建内部无法识别
|
|
27
29
|
setTRTCStreamId(id) {
|
|
30
|
+
trtcCloud.logger.info('trtc-player setTRTCStreamId', id)
|
|
28
31
|
return new Promise((resolve, reject) => {
|
|
29
32
|
try {
|
|
30
33
|
this.data.streamId = id
|
package/src/trtc-player.wxml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<view class="trtc-player-container">
|
|
2
|
-
<live-player
|
|
2
|
+
<live-player class="trtc-player" id="{{player.streamID}}" data-userid="{{player.userID}}"
|
|
3
3
|
data-streamid="{{player.streamID}}" data-streamtype="{{player.streamType}}" src="{{player.src}}" mode="RTC"
|
|
4
4
|
autoplay="{{player.autoplay}}" mute-audio="{{player.muteAudio}}" mute-video="{{player.muteVideo}}"
|
|
5
5
|
orientation="{{player.orientation}}" object-fit="{{player.objectFit}}"
|
package/src/trtc-pusher.js
CHANGED
|
@@ -15,9 +15,11 @@ Component({
|
|
|
15
15
|
},
|
|
16
16
|
lifetimes: {
|
|
17
17
|
attached() {
|
|
18
|
+
trtcCloud.logger.info('trtc-pusher attached')
|
|
18
19
|
this.bindTRTCCloudEvent()
|
|
19
20
|
},
|
|
20
21
|
detached() {
|
|
22
|
+
trtcCloud.logger.info('trtc-pusher detached')
|
|
21
23
|
this.unbindTRTCCloudEvent()
|
|
22
24
|
trtcCloud.exitRoom()
|
|
23
25
|
},
|