Skip to content

Commit

Permalink
fix: 通过 hideMobileControls 控制 loading 状态时允许暂停视频
Browse files Browse the repository at this point in the history
  • Loading branch information
kssaerbeisi123 authored and ambar committed Oct 27, 2021
1 parent 899ee91 commit 828426d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/griffith/src/components/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,11 @@ class InnerPlayer extends Component<InnerPlayerProps, State> {
}

handlePause = (type: ToggleType = null) => {
const {hideMobileControls} = this.props
this.props.onEvent(EVENTS.REQUEST_PAUSE)
const {isLoading} = this.state

if (!isLoading) {
if (!isLoading || hideMobileControls) {
this.setState({
lastAction: 'pause',
isPlaying: false,
Expand Down

0 comments on commit 828426d

Please sign in to comment.