diff --git a/components/my-video-list/list-item.vue b/components/my-video-list/list-item.vue index 2d3f324..2e36de3 100644 --- a/components/my-video-list/list-item.vue +++ b/components/my-video-list/list-item.vue @@ -7,6 +7,7 @@ :show-play-btn="false" :controls="true" @click.stop="videoClick()" + @loadedmetadata="loadedmetadata" @timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause" @play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2" :show-loading="true" codec="software" :muted="false" :loop="loop" @@ -17,7 +18,7 @@ mode="aspectFill"> - + @@ -181,6 +182,11 @@ function waiting() { } + + let videoIsLoadedmetadata=ref(false) + function loadedmetadata(){ + videoIsLoadedmetadata.value=true + } let isPlying = ref(false) @@ -211,9 +217,7 @@ function timeupdate(e) { //隐藏loding - // #ifdef H5 uni.hideLoading() - // #endif if (isPlayFinish) { return } @@ -308,7 +312,9 @@ } const showVideo = computed(() => { if(props.isAndriod){ - return props.nowIndex === props.index && props.item.videoUrl ?true :false + console.log('props.nowIndex === props.index '); + console.log(props.nowIndex,props.index ); + return (props.nowIndex === props.index && props.item.videoUrl) ?true :false }else{ return props.current === props.index && props.item.videoUrl } diff --git a/components/my-video-list/my-video-list.vue b/components/my-video-list/my-video-list.vue index 7ae1af1..48fdca4 100644 --- a/components/my-video-list/my-video-list.vue +++ b/components/my-video-list/my-video-list.vue @@ -1,37 +1,36 @@