@dolphinweex/weex-harmony 0.1.108 → 0.1.109
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', {
|
|
@@ -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,
|
|
@@ -144,6 +148,7 @@ 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,
|
|
@@ -165,6 +170,7 @@ export default {
|
|
|
165
170
|
playStatus: this.playStatus,
|
|
166
171
|
needDownload: this.needDownload,
|
|
167
172
|
isSupportScale: this.isSupportScale,
|
|
173
|
+
isPipMode: this.isPipMode,
|
|
168
174
|
videoResize: this.videoResize,
|
|
169
175
|
autoplay: this.autoplay,
|
|
170
176
|
videoCover: this.videoCover,
|
|
@@ -179,6 +185,7 @@ export default {
|
|
|
179
185
|
isShowTopRightViewOnPortrait: this.isShowTopRightViewOnPortrait,
|
|
180
186
|
monitorFullScreenBtn: this.monitorFullScreenBtn,
|
|
181
187
|
monitorBackBtn: this.monitorBackBtn,
|
|
188
|
+
// SameLayer 参数更新会直接触发 native updaeteFn,用于大小窗切换后恢复/停止进度轮询。
|
|
182
189
|
isNeedRequestProgress: this.isNeedRequestProgress,
|
|
183
190
|
onProgress: this.onProgress,
|
|
184
191
|
onStart: this.onStart,
|
|
@@ -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(
|