ソースを参照

edit video

ctt_dev
chutingting 1年前
コミット
edf8e593aa
1個のファイルの変更9行の追加3行の削除
  1. +9
    -3
      src/pages/login/index.vue

+ 9
- 3
src/pages/login/index.vue ファイルの表示

@@ -2,6 +2,7 @@
<view class="page">
<!-- <image src="../../assets/img/homeImg.jpg" mode="scaleToFill" /> -->
<video id="myVideo"
ref="myVideo"
src='https://video.metavatar.cc/sv/30f2d513-18c4739c509/30f2d513-18c4739c509.mp4'
autoplay
muted
@@ -22,10 +23,12 @@

<script setup>
//#region 导入
import { getCurrentInstance, ref } from "vue";
import { getCurrentInstance, ref,nextTick } from "vue";
import { isPlainObject, onLoad, onUnload } from "@dcloudio/uni-app";
import { userInfoModules } from "@/store/modules/userInfo";

const myVideo = ref(null);

const userInfoModulesPinia = userInfoModules();
//#endregion ----------------------------------

@@ -80,13 +83,16 @@ function fileReaderTest() {
// video.play();
// }

const videoContext = ref()
//#region 初始化
onLoad(() => {
nextTick(()=>{
const video = document.querySelector("video.uni-video-video");
video.muted = false
video.play()
})
runGetAndroidId();
// fileReaderTest();
userInfoModulesPinia.clearStorage();

});


読み込み中…
キャンセル
保存