@dolphinweex/weex-harmony 0.1.108 → 0.1.110
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
|
@@ -57,6 +57,7 @@ export default {
|
|
|
57
57
|
loop: this.loop,
|
|
58
58
|
auto: this.auto,
|
|
59
59
|
onPlayComplete: this.onPlayComplete,
|
|
60
|
+
preloadImage: this.preloadImage
|
|
60
61
|
};
|
|
61
62
|
},
|
|
62
63
|
},
|
|
@@ -69,6 +70,16 @@ export default {
|
|
|
69
70
|
onPlayComplete(res) {
|
|
70
71
|
this.$emit('onPlayComplete', res);
|
|
71
72
|
},
|
|
73
|
+
preloadImage(res) {
|
|
74
|
+
if (res === 'success') {
|
|
75
|
+
this.$emit('onLoadSuccess', res);
|
|
76
|
+
} else if (res === 'fail') {
|
|
77
|
+
this.$emit('onLoadFail', res);
|
|
78
|
+
} else {
|
|
79
|
+
// 兜底
|
|
80
|
+
this.$emit('preloadImage', res);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
72
83
|
// 自定义拓展其它逻辑
|
|
73
84
|
play(params, callback, callbackFail) {
|
|
74
85
|
weexModule.callNative('apngHandle', {
|
|
@@ -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: 'MideaIjkplayerView',
|
|
@@ -127,19 +128,30 @@ export default {
|
|
|
127
128
|
type: String,
|
|
128
129
|
default: '',
|
|
129
130
|
},
|
|
131
|
+
controls: {
|
|
132
|
+
type: String,
|
|
133
|
+
default: true,
|
|
134
|
+
},
|
|
130
135
|
isShowTopRightViewOnPortrait: {
|
|
131
136
|
type: Boolean,
|
|
132
137
|
default: false,
|
|
133
138
|
},
|
|
139
|
+
isShowFullScreenBtn:{
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: true,
|
|
142
|
+
},
|
|
134
143
|
},
|
|
135
144
|
computed: {
|
|
145
|
+
ref() {
|
|
146
|
+
return this.embedId;
|
|
147
|
+
},
|
|
136
148
|
hosSameLayerArgs() {
|
|
137
149
|
return {
|
|
138
|
-
...this.hosUniqueProps,
|
|
150
|
+
...this.hosUniqueProps,
|
|
139
151
|
width: this.width,
|
|
140
152
|
height: this.height,
|
|
153
|
+
controls: this.controls,
|
|
141
154
|
onFullscreenChange: this.onFullscreenChange,
|
|
142
|
-
// 视频播放器相关属性
|
|
143
155
|
config: this.config,
|
|
144
156
|
muted: this.muted,
|
|
145
157
|
playStatus: this.playStatus,
|
|
@@ -170,6 +182,11 @@ export default {
|
|
|
170
182
|
onStartDownload: this.onStartDownload,
|
|
171
183
|
onPreviewImageClick: this.onPreviewImageClick,
|
|
172
184
|
onCaptureCompletion: this.onCaptureCompletion,
|
|
185
|
+
onPlayerClick: this.onPlayerClick,
|
|
186
|
+
onSwitchFullScreen: this.onSwitchFullScreen,
|
|
187
|
+
onClickBack: this.onClickBack,
|
|
188
|
+
onScaleChanged: this.onScaleChanged,
|
|
189
|
+
isShowFullScreenBtn: this.isShowFullScreenBtn
|
|
173
190
|
};
|
|
174
191
|
},
|
|
175
192
|
},
|
|
@@ -183,6 +200,7 @@ export default {
|
|
|
183
200
|
this.defaultHeight = this.$refs.sameLayer.$el.clientHeight;
|
|
184
201
|
this.defaultPosition =
|
|
185
202
|
this.$refs.sameLayer.$el.style.position || 'static';
|
|
203
|
+
this.embedId = this.$refs.sameLayer.embedId;
|
|
186
204
|
});
|
|
187
205
|
},
|
|
188
206
|
methods: {
|
|
@@ -78,6 +78,10 @@ export default {
|
|
|
78
78
|
type: Boolean,
|
|
79
79
|
default: false,
|
|
80
80
|
},
|
|
81
|
+
isPipMode: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
81
85
|
videoResize: {
|
|
82
86
|
type: Number,
|
|
83
87
|
default: 0,
|
|
@@ -129,7 +133,7 @@ export default {
|
|
|
129
133
|
default: '',
|
|
130
134
|
},
|
|
131
135
|
controls: {
|
|
132
|
-
type: String,
|
|
136
|
+
type: [Boolean, String],
|
|
133
137
|
default: true,
|
|
134
138
|
},
|
|
135
139
|
isShowTopRightViewOnPortrait: {
|
|
@@ -144,10 +148,15 @@ export default {
|
|
|
144
148
|
type: Boolean,
|
|
145
149
|
default: false,
|
|
146
150
|
},
|
|
151
|
+
// 回放大窗才需要拉取 P2P 信令进度;小窗关闭可减少无效轮询。
|
|
147
152
|
isNeedRequestProgress: {
|
|
148
153
|
type: Boolean,
|
|
149
154
|
default: true,
|
|
150
155
|
},
|
|
156
|
+
harmonyRecordPipSize:{
|
|
157
|
+
type: Object,
|
|
158
|
+
default: ()=>{},
|
|
159
|
+
},
|
|
151
160
|
},
|
|
152
161
|
computed: {
|
|
153
162
|
ref() {
|
|
@@ -165,6 +174,7 @@ export default {
|
|
|
165
174
|
playStatus: this.playStatus,
|
|
166
175
|
needDownload: this.needDownload,
|
|
167
176
|
isSupportScale: this.isSupportScale,
|
|
177
|
+
isPipMode: this.isPipMode,
|
|
168
178
|
videoResize: this.videoResize,
|
|
169
179
|
autoplay: this.autoplay,
|
|
170
180
|
videoCover: this.videoCover,
|
|
@@ -179,6 +189,7 @@ export default {
|
|
|
179
189
|
isShowTopRightViewOnPortrait: this.isShowTopRightViewOnPortrait,
|
|
180
190
|
monitorFullScreenBtn: this.monitorFullScreenBtn,
|
|
181
191
|
monitorBackBtn: this.monitorBackBtn,
|
|
192
|
+
// SameLayer 参数更新会直接触发 native updaeteFn,用于大小窗切换后恢复/停止进度轮询。
|
|
182
193
|
isNeedRequestProgress: this.isNeedRequestProgress,
|
|
183
194
|
onProgress: this.onProgress,
|
|
184
195
|
onStart: this.onStart,
|
|
@@ -195,6 +206,7 @@ export default {
|
|
|
195
206
|
onSwitchFullScreen: this.onSwitchFullScreen,
|
|
196
207
|
onClickBack: this.onClickBack,
|
|
197
208
|
onScaleChanged: this.onScaleChanged,
|
|
209
|
+
harmonyRecordPipSize:this.harmonyRecordPipSize,
|
|
198
210
|
};
|
|
199
211
|
},
|
|
200
212
|
},
|
|
@@ -53,6 +53,10 @@ export default {
|
|
|
53
53
|
type: Boolean,
|
|
54
54
|
default: false,
|
|
55
55
|
},
|
|
56
|
+
isPipMode: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
56
60
|
controls: {
|
|
57
61
|
type: Boolean,
|
|
58
62
|
default: false,
|
|
@@ -130,6 +134,7 @@ export default {
|
|
|
130
134
|
videoCover: this.videoCover,
|
|
131
135
|
bottomShadow: this.bottomShadow,
|
|
132
136
|
isSupportScale: this.isSupportScale,
|
|
137
|
+
isPipMode: this.isPipMode,
|
|
133
138
|
controls: this.controls,
|
|
134
139
|
topShadow: this.topShadow,
|
|
135
140
|
hosUniqueProps: this.hosUniqueProps,
|
|
@@ -148,8 +153,23 @@ export default {
|
|
|
148
153
|
this.width = this.$el.clientWidth;
|
|
149
154
|
this.height = this.$el.clientHeight;
|
|
150
155
|
this.embedId = this.$refs.baseSameLayer && this.$refs.baseSameLayer.embedId;
|
|
156
|
+
this.syncEmbedSize();
|
|
157
|
+
},
|
|
158
|
+
updated() {
|
|
159
|
+
this.syncEmbedSize();
|
|
151
160
|
},
|
|
152
161
|
methods: {
|
|
162
|
+
syncEmbedSize() {
|
|
163
|
+
if (!this.$el) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const w = this.$el.clientWidth;
|
|
167
|
+
const h = this.$el.clientHeight;
|
|
168
|
+
if (w > 0 && h > 0 && (w !== this.width || h !== this.height)) {
|
|
169
|
+
this.width = w;
|
|
170
|
+
this.height = h;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
153
173
|
captureImage(params, callback) {
|
|
154
174
|
delete params.refId;
|
|
155
175
|
weexModule.callNative(
|