优化h5推荐页面视频播放展示形式

This commit is contained in:
2025-01-15 15:42:46 +08:00
parent c276c9431b
commit 7eec5a36f6
4 changed files with 19 additions and 8 deletions

View File

@@ -1,7 +1,8 @@
<template>
<view class="item" @appear="appear" @disappear="disappear" @click.stop>
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}">
<video class="u-flex-1 video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause" @click="videoClick()"
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="loop"
@@ -69,6 +70,10 @@
// #endif
const props = defineProps({
height:{
type:Number,
default:0
},
item: {
type: Object,
defaulr: () => {
@@ -342,8 +347,8 @@
<style lang="scss" scoped>
.item {
flex: 1;
height: 100%;
// flex: 1;
// height: 100%;
position: relative;
}