askbot-dragon 1.7.91-beta → 1.7.92-beta

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.7.91-beta",
3
+ "version": "1.7.92-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -13,7 +13,7 @@
13
13
  /> -->
14
14
  <video
15
15
  controls="controls"
16
- :controlslist="nodownload&&'nodownload'"
16
+ :controlslist="controlAttributes"
17
17
  :raw-controls="true"
18
18
  x5-video-player-type="h5-page"
19
19
  style="object-fit: contain;width: calc(100vw - 139px);height: 160px;background-color: black;border-radius: 10px;max-width: 230px;padding-left: 10px"
@@ -42,7 +42,8 @@
42
42
  return {
43
43
  videoSrc:'',
44
44
  poster:'',
45
- isFullscreen:false
45
+ isFullscreen:false,
46
+ isAndroid:false
46
47
  }
47
48
  },
48
49
  watch: {
@@ -56,6 +57,13 @@
56
57
  },
57
58
  src() {
58
59
  return this.url ? this.url : this.localUrl;
60
+ },
61
+ controlAttributes(){
62
+ /* 安卓手机自定义了全屏样式,所以禁掉原生的全屏 */
63
+ const attributes = []
64
+ if (this.isAndroid) attributes.push('nofullscreen')
65
+ if (this.nodownload&&'nodownload') attributes.push('nodownload')
66
+ return attributes.join(' ')
59
67
  }
60
68
  },
61
69
  mounted() {
@@ -73,6 +81,7 @@
73
81
  const videoContainer = document.getElementById(containerId);
74
82
  // 仅在 Android 设备尝试自动全屏
75
83
  const isAndroid = /Android/i.test(navigator.userAgent);
84
+ this.isAndroid = isAndroid;
76
85
  if (isAndroid){
77
86
  video.addEventListener('play', () => {
78
87
  // 仅在全屏请求由用户触发时有效(如点击播放按钮后)