hookehuyr

fix: 在所有视频播放器中禁用iOS原生播放器

统一在所有VideoPlayer组件中添加use-native-on-ios=false属性,避免iOS平台上的播放问题
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
66 </div> 66 </div>
67 <!-- Video Player --> 67 <!-- Video Player -->
68 <VideoPlayer v-if="v.video && v.isPlaying" :video-url="v.video" 68 <VideoPlayer v-if="v.video && v.isPlaying" :video-url="v.video"
69 - :video-id="v.id || `video-${post.id}-${idx}`" class="post-video rounded-lg overflow-hidden" 69 + :video-id="v.id || `video-${post.id}-${idx}`" :use-native-on-ios="false" class="post-video rounded-lg overflow-hidden"
70 :ref="(el) => setVideoRef(el, v.id)" @onPlay="(player) => handleVideoPlay(player, v)" 70 :ref="(el) => setVideoRef(el, v.id)" @onPlay="(player) => handleVideoPlay(player, v)"
71 @onPause="handleVideoPause" /> 71 @onPause="handleVideoPause" />
72 </div> 72 </div>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 </div> 30 </div>
31 31
32 <div v-if="videoUrl" class="video-preview"> 32 <div v-if="videoUrl" class="video-preview">
33 - <VideoPlayer ref="videoPlayerRef" :video-url="videoUrl" :autoplay="false" /> 33 + <VideoPlayer ref="videoPlayerRef" :video-url="videoUrl" :use-native-on-ios="false" :autoplay="false" />
34 </div> 34 </div>
35 </div> 35 </div>
36 </div> 36 </div>
......
1 <!-- 1 <!--
2 * @Date: 2025-03-20 19:55:21 2 * @Date: 2025-03-20 19:55:21
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-12-29 17:50:54 4 + * @LastEditTime: 2026-01-20 16:30:23
5 * @FilePath: /mlaj/src/views/HomePage.vue 5 * @FilePath: /mlaj/src/views/HomePage.vue
6 * @Description: 美乐爱觉教育首页组件 6 * @Description: 美乐爱觉教育首页组件
7 * 7 *
...@@ -311,6 +311,7 @@ ...@@ -311,6 +311,7 @@
311 v-else 311 v-else
312 :video-url="item.video_url" 312 :video-url="item.video_url"
313 :video-id="`home_recommend_video_${index}`" 313 :video-id="`home_recommend_video_${index}`"
314 + :use-native-on-ios="false"
314 /> 315 />
315 </div> 316 </div>
316 </div> 317 </div>
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
159 </div> 159 </div>
160 <!-- 视频播放器 --> 160 <!-- 视频播放器 -->
161 <VideoPlayer v-show="isVideoPlaying" ref="videoPlayerRef" :video-url="videoUrl" 161 <VideoPlayer v-show="isVideoPlaying" ref="videoPlayerRef" :video-url="videoUrl"
162 - :video-id="videoTitle" :autoplay="false" class="w-full h-full" @play="handleVideoPlay" 162 + :video-id="videoTitle" :use-native-on-ios="false" :autoplay="false" class="w-full h-full" @play="handleVideoPlay"
163 @pause="handleVideoPause" /> 163 @pause="handleVideoPause" />
164 </div> 164 </div>
165 </div> 165 </div>
......
1 +<!--
2 + * @Date: 2025-04-14 16:30:51
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2026-01-20 16:30:30
5 + * @FilePath: /mlaj/src/views/upload_video.vue
6 + * @Description: 上传视频页面组件
7 +-->
1 <template> 8 <template>
2 <div class="upload-video-container"> 9 <div class="upload-video-container">
3 <div class="button-container"> 10 <div class="button-container">
...@@ -6,7 +13,7 @@ ...@@ -6,7 +13,7 @@
6 </div> 13 </div>
7 <div class="video-list"> 14 <div class="video-list">
8 <div v-for="video in videos" :key="video.id" class="video-preview"> 15 <div v-for="video in videos" :key="video.id" class="video-preview">
9 - <VideoPlayer :video-url="video.url" :autoplay="false" /> 16 + <VideoPlayer :video-url="video.url" :use-native-on-ios="false" :autoplay="false" />
10 <div class="video-info"> 17 <div class="video-info">
11 <span class="video-name">{{ video.name }}</span> 18 <span class="video-name">{{ video.name }}</span>
12 <van-button icon="delete" type="danger" size="small" class="delete-btn" @click="deleteVideo(video.id)">删除</van-button> 19 <van-button icon="delete" type="danger" size="small" class="delete-btn" @click="deleteVideo(video.id)">删除</van-button>
......