修复h5默认值错误问题
This commit is contained in:
@@ -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">
|
||||
</image>
|
||||
|
||||
<view class="play-icon" v-if="showVideo&&!isPlying" @click.stop="videoClick()" :style="playStyle">
|
||||
<view class="play-icon" v-if="videoIsLoadedmetadata&&showVideo&&!isPlying" @click.stop="videoClick()" :style="playStyle">
|
||||
<image class="icon" src="@/static/images/play.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user