@dolphinweex/weex-harmony 0.1.107 → 0.1.108
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
CHANGED
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
embedPosition: 'static',
|
|
37
37
|
defaultWidth: '100%',
|
|
38
38
|
defaultHeight: '100%',
|
|
39
|
+
embedId: '',
|
|
39
40
|
};
|
|
40
41
|
},
|
|
41
42
|
name: 'MideaIpcIjkplayerView',
|
|
@@ -135,16 +136,30 @@ export default {
|
|
|
135
136
|
type: Boolean,
|
|
136
137
|
default: false,
|
|
137
138
|
},
|
|
139
|
+
monitorFullScreenBtn: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false,
|
|
142
|
+
},
|
|
143
|
+
monitorBackBtn: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: false,
|
|
146
|
+
},
|
|
147
|
+
isNeedRequestProgress: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: true,
|
|
150
|
+
},
|
|
138
151
|
},
|
|
139
152
|
computed: {
|
|
153
|
+
ref() {
|
|
154
|
+
return this.embedId;
|
|
155
|
+
},
|
|
140
156
|
hosSameLayerArgs() {
|
|
141
157
|
return {
|
|
142
|
-
...this.hosUniqueProps,
|
|
158
|
+
...this.hosUniqueProps,
|
|
143
159
|
width: this.width,
|
|
144
160
|
height: this.height,
|
|
145
161
|
controls: this.controls,
|
|
146
162
|
onFullscreenChange: this.onFullscreenChange,
|
|
147
|
-
// 视频播放器相关属性
|
|
148
163
|
config: this.config,
|
|
149
164
|
muted: this.muted,
|
|
150
165
|
playStatus: this.playStatus,
|
|
@@ -162,8 +177,9 @@ export default {
|
|
|
162
177
|
data: this.data,
|
|
163
178
|
src: this.src,
|
|
164
179
|
isShowTopRightViewOnPortrait: this.isShowTopRightViewOnPortrait,
|
|
165
|
-
|
|
166
|
-
|
|
180
|
+
monitorFullScreenBtn: this.monitorFullScreenBtn,
|
|
181
|
+
monitorBackBtn: this.monitorBackBtn,
|
|
182
|
+
isNeedRequestProgress: this.isNeedRequestProgress,
|
|
167
183
|
onProgress: this.onProgress,
|
|
168
184
|
onStart: this.onStart,
|
|
169
185
|
onPause: this.onPause,
|
|
@@ -175,7 +191,10 @@ export default {
|
|
|
175
191
|
onStartDownload: this.onStartDownload,
|
|
176
192
|
onPreviewImageClick: this.onPreviewImageClick,
|
|
177
193
|
onCaptureCompletion: this.onCaptureCompletion,
|
|
178
|
-
onPlayerClick: this.onPlayerClick
|
|
194
|
+
onPlayerClick: this.onPlayerClick,
|
|
195
|
+
onSwitchFullScreen: this.onSwitchFullScreen,
|
|
196
|
+
onClickBack: this.onClickBack,
|
|
197
|
+
onScaleChanged: this.onScaleChanged,
|
|
179
198
|
};
|
|
180
199
|
},
|
|
181
200
|
},
|
|
@@ -189,66 +208,63 @@ export default {
|
|
|
189
208
|
this.defaultHeight = this.$refs.sameLayer.$el.clientHeight;
|
|
190
209
|
this.defaultPosition =
|
|
191
210
|
this.$refs.sameLayer.$el.style.position || 'static';
|
|
211
|
+
this.embedId = this.$refs.sameLayer.embedId;
|
|
192
212
|
});
|
|
193
213
|
},
|
|
194
214
|
methods: {
|
|
195
|
-
setSpeed(params){
|
|
196
|
-
|
|
197
|
-
console.log('cdj---setSpeed',JSON.stringify(params))
|
|
198
|
-
delete params.refId
|
|
215
|
+
setSpeed(params) {
|
|
216
|
+
delete params.refId;
|
|
199
217
|
weexModule.callNative(
|
|
200
218
|
'ijkLinkApi',
|
|
201
219
|
{
|
|
202
220
|
method: 'setSpeed',
|
|
203
221
|
name: this.embedId,
|
|
204
|
-
params
|
|
222
|
+
params,
|
|
205
223
|
},
|
|
206
224
|
callback
|
|
207
225
|
);
|
|
208
226
|
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
console.log('cdj---setSpseekeed',JSON.stringify(params))
|
|
212
|
-
delete params.refId
|
|
227
|
+
seek(params) {
|
|
228
|
+
delete params.refId;
|
|
213
229
|
weexModule.callNative(
|
|
214
230
|
'ijkLinkApi',
|
|
215
231
|
{
|
|
216
232
|
method: 'seek',
|
|
217
233
|
name: this.embedId,
|
|
218
|
-
params
|
|
234
|
+
params,
|
|
219
235
|
},
|
|
220
236
|
callback
|
|
221
237
|
);
|
|
222
238
|
},
|
|
223
|
-
captureImage(params,callback) {
|
|
224
|
-
delete params.refId
|
|
239
|
+
captureImage(params, callback) {
|
|
240
|
+
delete params.refId;
|
|
225
241
|
weexModule.callNative(
|
|
226
242
|
'ijkLinkApi',
|
|
227
243
|
{
|
|
228
244
|
method: 'captureImage',
|
|
229
245
|
name: this.embedId,
|
|
230
|
-
params
|
|
246
|
+
params,
|
|
231
247
|
},
|
|
232
248
|
callback
|
|
233
249
|
);
|
|
234
250
|
},
|
|
235
|
-
finishFullScreen(){
|
|
236
|
-
try{
|
|
237
|
-
this.$bridge.setPageOrientation({ orientation: 0 })
|
|
238
|
-
}catch(e){
|
|
251
|
+
finishFullScreen() {
|
|
252
|
+
try {
|
|
253
|
+
this.$bridge.setPageOrientation({ orientation: 0 });
|
|
254
|
+
} catch (e) {
|
|
239
255
|
}
|
|
240
256
|
this.embedPosition = this.defaultPosition;
|
|
241
257
|
this.embedHeight = this.windowHeight;
|
|
242
258
|
this.embedWidth = this.windowWidth;
|
|
243
259
|
},
|
|
244
|
-
disabledEvent(){
|
|
245
|
-
document.body.style.pointerEvents = 'none'
|
|
246
|
-
setTimeout(()=>{
|
|
247
|
-
document.body.style.pointerEvents = 'auto'
|
|
248
|
-
},1000)
|
|
260
|
+
disabledEvent() {
|
|
261
|
+
document.body.style.pointerEvents = 'none';
|
|
262
|
+
setTimeout(() => {
|
|
263
|
+
document.body.style.pointerEvents = 'auto';
|
|
264
|
+
}, 1000);
|
|
249
265
|
},
|
|
250
266
|
onFullscreenChange(isFullScreeen) {
|
|
251
|
-
this.disabledEvent()
|
|
267
|
+
this.disabledEvent();
|
|
252
268
|
if (isFullScreeen.flag) {
|
|
253
269
|
this.embedPosition = 'fixed';
|
|
254
270
|
this.embedHeight = this.windowWidth;
|
|
@@ -259,58 +275,57 @@ export default {
|
|
|
259
275
|
this.embedWidth = this.defaultWidth;
|
|
260
276
|
}
|
|
261
277
|
},
|
|
262
|
-
// 自定义拓展其它逻辑
|
|
263
278
|
onProgress(res) {
|
|
264
279
|
this.$emit('onProgress', res);
|
|
265
280
|
},
|
|
266
|
-
|
|
267
281
|
onStart(res) {
|
|
268
282
|
this.$emit('start', res);
|
|
269
283
|
},
|
|
270
|
-
|
|
271
284
|
onPause(res) {
|
|
272
285
|
this.$emit('Pause', res);
|
|
273
286
|
},
|
|
274
|
-
|
|
275
287
|
finish(res) {
|
|
276
288
|
this.$emit('finish', res);
|
|
277
289
|
},
|
|
278
|
-
|
|
279
290
|
onFail(res) {
|
|
280
291
|
this.$emit('fail', res);
|
|
281
292
|
},
|
|
282
|
-
|
|
283
293
|
onReadyToPlay(res) {
|
|
284
294
|
this.$emit('readyToPlay', res);
|
|
285
295
|
},
|
|
286
|
-
|
|
287
296
|
deleteVideo(res) {
|
|
288
297
|
this.$emit('deleteVideo', res);
|
|
289
298
|
},
|
|
290
|
-
|
|
291
299
|
onDownloadSuccess(res) {
|
|
292
300
|
this.$emit('onDownloadSuccess', res);
|
|
293
301
|
},
|
|
294
|
-
|
|
295
|
-
onStartDownload(res) {
|
|
302
|
+
onStartDownload(res) {
|
|
296
303
|
this.$emit('onStartDownload', res);
|
|
297
304
|
},
|
|
298
|
-
|
|
299
305
|
onPreviewImageClick(res) {
|
|
300
306
|
this.$emit('onPreviewImageClick', res);
|
|
301
307
|
},
|
|
302
|
-
onCaptureCompletion(res){
|
|
308
|
+
onCaptureCompletion(res) {
|
|
303
309
|
this.$emit('onCaptureCompletion', res);
|
|
304
310
|
},
|
|
305
|
-
onPlayerClick(res){
|
|
311
|
+
onPlayerClick(res) {
|
|
306
312
|
this.$emit('onPlayerClick', res);
|
|
307
|
-
}
|
|
313
|
+
},
|
|
314
|
+
onSwitchFullScreen(res) {
|
|
315
|
+
this.$emit('onSwitchFullScreen', res);
|
|
316
|
+
},
|
|
317
|
+
onClickBack(res) {
|
|
318
|
+
this.$emit('onClickBack', res);
|
|
319
|
+
},
|
|
320
|
+
onScaleChanged(res) {
|
|
321
|
+
this.$emit('onScaleChanged', res);
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
destroy() {
|
|
325
|
+
this.embedPosition = this.defaultPosition;
|
|
326
|
+
this.embedHeight = this.defaultHeight;
|
|
327
|
+
this.embedWidth = this.defaultWidth;
|
|
328
|
+
document.body.style.pointerEvents = 'auto';
|
|
308
329
|
},
|
|
309
|
-
destroy(){
|
|
310
|
-
this.embedPosition = this.defaultPosition;
|
|
311
|
-
this.embedHeight = this.defaultHeight;
|
|
312
|
-
this.embedWidth = this.defaultWidth;
|
|
313
|
-
document.body.style.pointerEvents = 'auto'
|
|
314
|
-
}
|
|
315
330
|
};
|
|
316
331
|
</script>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseSameLayer
|
|
3
|
+
ref="baseSameLayer"
|
|
3
4
|
:hosSameLayerArgs="hosSameLayerArgs"
|
|
4
5
|
embedType="native/midea-ipc-live-view"
|
|
5
6
|
:defaultWidth="300"
|
|
@@ -16,6 +17,7 @@ export default {
|
|
|
16
17
|
return {
|
|
17
18
|
width: 0,
|
|
18
19
|
height: 0,
|
|
20
|
+
embedId: '',
|
|
19
21
|
};
|
|
20
22
|
},
|
|
21
23
|
name: 'MideaIpcLiveView',
|
|
@@ -32,7 +34,6 @@ export default {
|
|
|
32
34
|
default: '',
|
|
33
35
|
},
|
|
34
36
|
videoResize: {
|
|
35
|
-
// videoResize?: 0 | 1 | 2; // 0=Aspect,1=AspectFill,2=Resize(容器表现)
|
|
36
37
|
type: Number,
|
|
37
38
|
default: '',
|
|
38
39
|
},
|
|
@@ -60,6 +61,34 @@ export default {
|
|
|
60
61
|
type: Object,
|
|
61
62
|
default: () => {},
|
|
62
63
|
},
|
|
64
|
+
channel: {
|
|
65
|
+
type: [Number, String],
|
|
66
|
+
default: 0,
|
|
67
|
+
},
|
|
68
|
+
playStatus: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: '',
|
|
71
|
+
},
|
|
72
|
+
mute: {
|
|
73
|
+
type: [Number, Boolean],
|
|
74
|
+
default: 1,
|
|
75
|
+
},
|
|
76
|
+
writeToFile: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: 1,
|
|
79
|
+
},
|
|
80
|
+
analyzeDuration: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 100000,
|
|
83
|
+
},
|
|
84
|
+
isOnlyOnePlayer: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: true,
|
|
87
|
+
},
|
|
88
|
+
disallowInterceptTouchEvent: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
63
92
|
hosUniqueProps: {
|
|
64
93
|
type: Object,
|
|
65
94
|
default() {
|
|
@@ -74,14 +103,28 @@ export default {
|
|
|
74
103
|
},
|
|
75
104
|
},
|
|
76
105
|
computed: {
|
|
106
|
+
ref() {
|
|
107
|
+
return this.embedId;
|
|
108
|
+
},
|
|
109
|
+
muted() {
|
|
110
|
+
return this.mute === 1 || this.mute === true;
|
|
111
|
+
},
|
|
77
112
|
hosSameLayerArgs() {
|
|
78
113
|
return {
|
|
79
|
-
...this.hosUniqueProps,
|
|
114
|
+
...this.hosUniqueProps,
|
|
80
115
|
width: this.width,
|
|
81
116
|
height: this.height,
|
|
82
117
|
data: this.data,
|
|
83
118
|
src: this.src,
|
|
84
119
|
url: this.url,
|
|
120
|
+
channel: this.channel,
|
|
121
|
+
playStatus: this.playStatus,
|
|
122
|
+
muted: this.muted,
|
|
123
|
+
mute: this.mute,
|
|
124
|
+
writeToFile: this.writeToFile,
|
|
125
|
+
analyzeDuration: this.analyzeDuration,
|
|
126
|
+
isOnlyOnePlayer: this.isOnlyOnePlayer,
|
|
127
|
+
disallowInterceptTouchEvent: this.disallowInterceptTouchEvent,
|
|
85
128
|
videoResize: this.videoResize,
|
|
86
129
|
autoplay: this.autoplay,
|
|
87
130
|
videoCover: this.videoCover,
|
|
@@ -93,6 +136,7 @@ export default {
|
|
|
93
136
|
onPlayerClick: this.onPlayerClick,
|
|
94
137
|
onMoveControl: this.onMoveControl,
|
|
95
138
|
onScaleControl: this.onScaleControl,
|
|
139
|
+
onScaleChanged: this.onScaleChanged,
|
|
96
140
|
onMoveEnd: this.onMoveEnd,
|
|
97
141
|
onStatePrepared: this.onStatePrepared,
|
|
98
142
|
onAutoCompletion: this.onAutoCompletion,
|
|
@@ -103,93 +147,88 @@ export default {
|
|
|
103
147
|
mounted() {
|
|
104
148
|
this.width = this.$el.clientWidth;
|
|
105
149
|
this.height = this.$el.clientHeight;
|
|
150
|
+
this.embedId = this.$refs.baseSameLayer && this.$refs.baseSameLayer.embedId;
|
|
106
151
|
},
|
|
107
|
-
watch:{
|
|
108
|
-
url(newV){
|
|
109
|
-
console.log('cdj-------------url',newV)
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
152
|
methods: {
|
|
113
|
-
captureImage(params,callback) {
|
|
114
|
-
delete params.refId
|
|
153
|
+
captureImage(params, callback) {
|
|
154
|
+
delete params.refId;
|
|
115
155
|
weexModule.callNative(
|
|
116
156
|
'ipcLinkApi',
|
|
117
157
|
{
|
|
118
158
|
method: 'captureImage',
|
|
119
159
|
name: this.embedId,
|
|
120
|
-
params
|
|
160
|
+
params,
|
|
121
161
|
},
|
|
122
162
|
callback
|
|
123
163
|
);
|
|
124
164
|
},
|
|
125
|
-
switchVideoQuality(params,callback) {
|
|
165
|
+
switchVideoQuality(params, callback) {
|
|
126
166
|
weexModule.callNative(
|
|
127
167
|
'ipcLinkApi',
|
|
128
168
|
{
|
|
129
169
|
method: 'switchVideoQuality',
|
|
130
170
|
name: this.embedId,
|
|
131
|
-
params
|
|
171
|
+
params,
|
|
132
172
|
},
|
|
133
173
|
callback
|
|
134
174
|
);
|
|
135
175
|
},
|
|
136
|
-
getVideoNetworkSpeed(params,callback) {
|
|
176
|
+
getVideoNetworkSpeed(params, callback) {
|
|
137
177
|
weexModule.callNative(
|
|
138
178
|
'ipcLinkApi',
|
|
139
179
|
{
|
|
140
180
|
method: 'getVideoNetworkSpeed',
|
|
141
181
|
name: this.embedId,
|
|
142
|
-
params
|
|
182
|
+
params,
|
|
143
183
|
},
|
|
144
184
|
callback
|
|
145
185
|
);
|
|
146
186
|
},
|
|
147
|
-
startRecord(params,callback) {
|
|
187
|
+
startRecord(params, callback) {
|
|
148
188
|
weexModule.callNative(
|
|
149
189
|
'ipcLinkApi',
|
|
150
190
|
{
|
|
151
191
|
method: 'startRecord',
|
|
152
192
|
name: this.embedId,
|
|
153
|
-
params
|
|
193
|
+
params,
|
|
154
194
|
},
|
|
155
195
|
callback
|
|
156
196
|
);
|
|
157
197
|
},
|
|
158
|
-
stopRecord(params,callback) {
|
|
198
|
+
stopRecord(params, callback) {
|
|
159
199
|
weexModule.callNative(
|
|
160
200
|
'ipcLinkApi',
|
|
161
201
|
{
|
|
162
202
|
method: 'stopRecord',
|
|
163
203
|
name: this.embedId,
|
|
164
|
-
params
|
|
204
|
+
params,
|
|
165
205
|
},
|
|
166
206
|
callback
|
|
167
207
|
);
|
|
168
208
|
},
|
|
169
|
-
changeAudioStatus(params,callback){
|
|
209
|
+
changeAudioStatus(params, callback) {
|
|
170
210
|
weexModule.callNative(
|
|
171
211
|
'ipcLinkApi',
|
|
172
212
|
{
|
|
173
213
|
method: 'changeAudioStatus',
|
|
174
214
|
name: this.embedId,
|
|
175
|
-
params
|
|
215
|
+
params,
|
|
176
216
|
},
|
|
177
217
|
callback
|
|
178
218
|
);
|
|
179
219
|
},
|
|
180
|
-
// 自定义拓展其它逻辑
|
|
181
220
|
onPlayerClick(res) {
|
|
182
221
|
this.$emit('onPlayerClick', res);
|
|
183
222
|
},
|
|
184
|
-
|
|
185
223
|
onMoveControl(res) {
|
|
186
224
|
this.$emit('onMoveControl', res);
|
|
187
225
|
},
|
|
188
|
-
|
|
189
226
|
onScaleControl(res) {
|
|
190
227
|
this.$emit('onScaleControl', res);
|
|
191
228
|
},
|
|
192
|
-
|
|
229
|
+
onScaleChanged(res) {
|
|
230
|
+
this.$emit('onScaleChanged', res);
|
|
231
|
+
},
|
|
193
232
|
onMoveEnd(res) {
|
|
194
233
|
this.$emit('onMoveEnd', res);
|
|
195
234
|
},
|