@flexem/fc-gui 3.0.0-alpha.59 → 3.0.0-alpha.60
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/bundles/@flexem/fc-gui.umd.js +51 -52
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/video/video-element.d.ts +0 -1
- package/elements/video/video-element.js +51 -52
- package/elements/video/video-element.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -29894,64 +29894,63 @@ class video_element_VideoElement extends conditional_display_element_Conditional
|
|
|
29894
29894
|
return;
|
|
29895
29895
|
}
|
|
29896
29896
|
this.videoId = guid["a" /* Guid */].newGuid().toString('n');
|
|
29897
|
-
this.rootElement.append('rect').attr('id', 'rect' + this.videoId).attr('fill', 'transparent')
|
|
29898
|
-
.attr('width', this.model.size.width)
|
|
29899
|
-
.attr('height', this.model.size.height);
|
|
29900
29897
|
this.videoService.getVideoUrl(this.model.videoTag).then(result => {
|
|
29901
|
-
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
|
|
29906
|
-
initVideo(videoUrl, isMobileType, videoId) {
|
|
29907
|
-
const patt = /https:.+.m3u8/;
|
|
29908
|
-
if (videoUrl.indexOf('http:') !== -1) {
|
|
29909
|
-
videoUrl = videoUrl.replace('http:', 'https:');
|
|
29910
|
-
}
|
|
29911
|
-
if (!patt.test(videoUrl)) {
|
|
29912
|
-
let videoToolTip = this.localization.invalidVideoAddress;
|
|
29913
|
-
if (Object(lodash["isNil"])(videoUrl) || videoUrl === '') {
|
|
29914
|
-
videoToolTip = this.localization.unconfiguredVideoAddress;
|
|
29898
|
+
const isAndroid = !!navigator.userAgent.match(/(Android)/i);
|
|
29899
|
+
let videoUrl = result.url;
|
|
29900
|
+
const patt = /https:.+.m3u8/;
|
|
29901
|
+
if (videoUrl.indexOf('http:') !== -1) {
|
|
29902
|
+
videoUrl = videoUrl.replace('http:', 'https:');
|
|
29915
29903
|
}
|
|
29916
|
-
|
|
29917
|
-
|
|
29918
|
-
|
|
29919
|
-
|
|
29920
|
-
|
|
29921
|
-
|
|
29922
|
-
|
|
29923
|
-
|
|
29924
|
-
|
|
29925
|
-
|
|
29926
|
-
|
|
29927
|
-
|
|
29928
|
-
|
|
29929
|
-
|
|
29930
|
-
|
|
29931
|
-
|
|
29932
|
-
|
|
29933
|
-
|
|
29934
|
-
|
|
29935
|
-
|
|
29936
|
-
|
|
29904
|
+
if (!patt.test(videoUrl)) {
|
|
29905
|
+
let videoToolTip = this.localization.invalidVideoAddress;
|
|
29906
|
+
if (Object(lodash["isNil"])(videoUrl) || videoUrl === '') {
|
|
29907
|
+
videoToolTip = this.localization.unconfiguredVideoAddress;
|
|
29908
|
+
}
|
|
29909
|
+
this.addVideoAddressToolTip(videoToolTip);
|
|
29910
|
+
return;
|
|
29911
|
+
}
|
|
29912
|
+
const video = this.rootElement.append('foreignObject')
|
|
29913
|
+
.attr('x', 0)
|
|
29914
|
+
.attr('y', 0)
|
|
29915
|
+
.attr('width', this.model.size.width)
|
|
29916
|
+
.attr('height', this.model.size.height)
|
|
29917
|
+
.append('xhtml:video')
|
|
29918
|
+
.attr('id', this.videoId)
|
|
29919
|
+
.attr('scareX', this.model.location.x / this.guiSize.width)
|
|
29920
|
+
.attr('scareY', this.model.location.y / this.guiSize.height)
|
|
29921
|
+
.attr('src', videoUrl)
|
|
29922
|
+
.style('width', '100%')
|
|
29923
|
+
.style('height', '100%')
|
|
29924
|
+
.attr('playsInline', true)
|
|
29925
|
+
.attr('webkit-playsinline', true);
|
|
29926
|
+
if (this.isMobileMode) {
|
|
29927
|
+
if (isAndroid) {
|
|
29928
|
+
if (result.isMobileType) {
|
|
29929
|
+
video.attr('controls', true);
|
|
29930
|
+
}
|
|
29931
|
+
video.attr('autoplay', true);
|
|
29932
|
+
video.attr('muted', true);
|
|
29933
|
+
}
|
|
29934
|
+
else {
|
|
29935
|
+
video.attr('controls', true);
|
|
29936
|
+
video.attr('muted', true);
|
|
29937
29937
|
}
|
|
29938
|
-
videoHtml += ' autoplay muted></video>';
|
|
29939
29938
|
}
|
|
29940
29939
|
else {
|
|
29941
|
-
|
|
29940
|
+
video.attr('controls', true);
|
|
29941
|
+
video.attr('autoplay', true);
|
|
29942
|
+
video.attr('muted', true);
|
|
29942
29943
|
}
|
|
29943
|
-
|
|
29944
|
-
|
|
29945
|
-
|
|
29946
|
-
|
|
29947
|
-
|
|
29948
|
-
|
|
29949
|
-
|
|
29950
|
-
}
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
this.setAndroidVideo(videoId);
|
|
29954
|
-
}
|
|
29944
|
+
if (this.isShow === false) {
|
|
29945
|
+
$('#' + this.videoId).hide();
|
|
29946
|
+
}
|
|
29947
|
+
this.videoPlayer = new EZUIPlayer(this.videoId);
|
|
29948
|
+
if (isAndroid && !result.isMobileType) {
|
|
29949
|
+
this.setAndroidVideo(this.videoId);
|
|
29950
|
+
}
|
|
29951
|
+
}).catch(() => {
|
|
29952
|
+
throw new Error('Failure of the videoService');
|
|
29953
|
+
});
|
|
29955
29954
|
}
|
|
29956
29955
|
addVideoAddressToolTip(videoToolTip) {
|
|
29957
29956
|
const size = this.model.size;
|