|
@@ -179,7 +179,7 @@ export default function VideoSwiper({ list, onFinish, needResumePlay, flushList,
|
|
|
|
|
|
function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, needResumePlay }) {
|
|
|
const [showEndCover, setShowEndCover] = useState(false)
|
|
|
- const [durPersec, setDurPersec] = useState(1)
|
|
|
+ const [durPersec, setDurPersec] = useState(0)
|
|
|
const [showProgressIndicator, setShowProgressIndicator] = useState(false)
|
|
|
const [playerState, setPlayerState] = useState(0)
|
|
|
const [isPlaying, setIsPlaying] = useState(false)
|
|
@@ -190,7 +190,7 @@ function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, need
|
|
|
const [startMoveX, setStartMoveX] = useState(0)
|
|
|
const [hasReportPlaySuccess, setHasReportPlaySuccess] = useState(false)
|
|
|
const [hasReportRealplay, setHasReportRealplay] = useState(false)
|
|
|
- const [showRedShareBtn, setShowRedShareBtn] = useState(false)
|
|
|
+ const [showRedShareBtn, setShowRedShareBtn] = useState(true)
|
|
|
|
|
|
let videoContext = Taro.createVideoContext(`${video.id}`)
|
|
|
const logReportVideoPlaySuccessOnce = once(logReportVideoPlaySuccess)
|
|
@@ -338,8 +338,8 @@ function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, need
|
|
|
let { width = 375 } = systemInfo.safeArea
|
|
|
|
|
|
// 移动中
|
|
|
- //计算 seek 进度,并设置播放器 seek。 等比设置:拖动屏幕宽距离,偏移 90% 进度
|
|
|
- let rate = distance / width * 0.9
|
|
|
+ //计算 seek 进度,并设置播放器 seek。 等比设置:拖动屏幕宽距离,偏移 100% 进度
|
|
|
+ let rate = distance / width * 1
|
|
|
return rate
|
|
|
}
|
|
|
|
|
@@ -361,13 +361,14 @@ function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, need
|
|
|
onSeekComplete={onSeekCom}
|
|
|
onTap={onTapVideo}
|
|
|
/>
|
|
|
- {(playerState == PlayState.pause) && <View className='playBtn'>
|
|
|
+ {(playerState == PlayState.pause) && <View className='playBtn' onClick={onTapVideo}>
|
|
|
<Image src='http://weapppiccdn.yishihui.com/wxicon/common/icon_play_btn_dark2.png'/>
|
|
|
</View>}
|
|
|
<View className='progress-bg'
|
|
|
onTouchStart={onTouchStart}
|
|
|
onTouchMove={onTouchMove}
|
|
|
onTouchEnd={onTouchEnd}
|
|
|
+ catchMove
|
|
|
>
|
|
|
<View className='progress-container'>
|
|
|
<View className='progress' style={{ width: `${durPersec * 100}%;` }}>
|
|
@@ -405,7 +406,7 @@ function VideoIntroduce({ detail, showRedShareBtn, index}) {
|
|
|
<View className='video-title'>
|
|
|
{detail.title}
|
|
|
</View>
|
|
|
- {showRedShareBtn && <Button className='redShareBtn' openType='share' data-button-type={2}>分享给群友</Button>}
|
|
|
+ {true && <Button className='redShareBtn' openType='share' data-button-type={2}>分享给群友</Button>}
|
|
|
</View>
|
|
|
)
|
|
|
}
|