优化h5推荐页面视频播放展示形式
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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"
|
||||
:controls="showControls" @timeupdate="timeupdate" @waiting="waiting()" object-fit="cover"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
||||
<swiper-item v-for="(item,index) in videoList" :key="index">
|
||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand"
|
||||
:height="wHeight"
|
||||
@playStatusChange="playStatusChange"
|
||||
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
||||
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
||||
@@ -23,6 +24,7 @@
|
||||
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
||||
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
||||
@playStatusChange="playStatusChange"
|
||||
:height="wHeight"
|
||||
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
|
||||
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
|
||||
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
|
||||
@@ -782,7 +784,6 @@
|
||||
configInit()
|
||||
onMounted(() => {
|
||||
init()
|
||||
|
||||
// setTimeout(()=>{
|
||||
// },500)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user