<view class="coach">
    <image class="coach-top-covers" src="https://cdn.shuiganying.com/images/2023/11/14/2479e438889445fe4a96199d5a839d20.png" mode="widthFix"/>
    <view class="coach-mirror" wx:if="{{!openCamera}}" catch:tap="openMirror">
        <image src="https://cdn.shuiganying.com/images/2023/11/14/645ff37d945dc409761df73bb2ce73cd.png" mode="widthFix"/> 镜子
    </view>
    <view class="coach-camera" wx:if="{{openCamera}}">
        <view class="coach-close" catch:tap="openMirror">X</view>
        <camera device-position="front" wx:if="{{isCamera}}" flash="off"></camera>
    </view>
    <view class="coach-avatar">
        <image src="https://cdn.shuiganying.com/images/2023/11/14/0835381c22b00f574afb34d319cce442.png" mode="aspectFill"/> 张三一
    </view>
    <view class="coach-top">
        <view class="coach-top-video">
            <image class="coach-top-cover" wx:if="{{!selectVideoItem.url}}"  src="https://cdn.shuiganying.com/images/2023/11/14/aee3a9b218b03f848e90a2093d2ec815.png" mode="widthFix"/>
            <video id="myVideo" controls="{{false}}" muted='{{selectVideoItem.muted}}' bindtimeupdate="videoTimeupdated" bindended='videoEnded' show-center-play-btn="{{false}}" class="coach-top-cover" wx:if="{{selectVideoItem.url}}" src="{{selectVideoItem.url}}"></video>
            <view class="coach-top-text" wx:if="{{selectVideoItem.id==0}}">请在下方选择视频</view>
        </view>
    </view>

    <view class="coach-bottom">
        <view class="steps-cont" wx:if="{{selectVideoItem.id != 0}}">
            <view class="steps-time">00:{{selectVideoItem.remainingTime}}</view>
            <view class="steps-title">{{selectVideoItem.steps[selectVideoItem.currentSteps].title}}</view>
        </view>

        <block wx:if="{{seeAllVideo}}">
            <swiper class="coach-swiper" display-multiple-items='3' bindchange='swiperChange'>
                <swiper-item class="coach-swiper-item" wx:for="{{videos}}" wx:key="item" catch:tap="selectVideo" data-item="{{item}}">
                    <image class="coach-swiper-item-cover" src="{{item.cover}}" mode="aspectFill"/>
                    <view class="coach-swiper-item-cover-active" wx:if="{{item.id == selectVideoItem.id}}"></view>
                </swiper-item>
            </swiper>
        </block>
        
        <view class="video-control" wx:if="{{selectVideoItem.id!=0}}">
            <image catch:tap="mutedTab" data-type='close' wx:if="{{!selectVideoItem.muted}}" class="source" src="https://cdn.shuiganying.com/images/2023/11/13/267603acf95fa978764417d7598aa8b0.png" mode="widthFix"/>
            <image catch:tap="mutedTab" data-type='open' wx:if="{{selectVideoItem.muted}}" src="https://cdn.shuiganying.com/images/2023/11/13/37fecae5af2faa01f5baba9c1c01affe.png" mode="widthFix"/>
            <view class="source-right">
                <image catch:tap="preTab" data-type='prev' class="prev" src="https://cdn.shuiganying.com/images/2023/11/13/4aaa5694a48601a6a2e199143cbdb565.png" mode="widthFix"/>
                <image class="play" wx:if="{{!selectVideoItem.playedState}}" catch:tap="videoPlayTab"  src="https://cdn.shuiganying.com/images/2023/11/13/e6402d0956059d7c3ac467d8995649fb.png" mode="widthFix"/>
                <image class="play" wx:if="{{selectVideoItem.playedState}}" catch:tap="videoPauseTab" src="https://cdn.shuiganying.com/images/2023/11/13/585e0a8c57cb2824a132c1eefde23370.png" mode="widthFix"/>
                <image catch:tap="preTab" data-type='next' class="next" src="https://cdn.shuiganying.com/images/2023/11/13/4aaa5694a48601a6a2e199143cbdb565.png" mode="widthFix"/>
                <view class="all-video" catch:tap="allVideoTab">{{!seeAllVideo?'全部视频':'隐藏'}}</view>
            </view>
        </view>
    </view>

</view>