File tree 1 file changed +6
-1
lines changed
special-pages/pages/duckplayer/app/components
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { h } from 'preact' ;
2
2
import { useOpenInfoHandler , useOpenOnYoutubeHandler , useOpenSettingsHandler } from '../providers/SettingsProvider.jsx' ;
3
+ import { usePlaybackControl } from './PlaybackControl.jsx' ;
3
4
import { useTypedTranslation } from '../types.js' ;
4
5
import { Button , Icon } from './Button.jsx' ;
5
6
@@ -15,6 +16,7 @@ export function MobileButtons({ embed }) {
15
16
const openSettings = useOpenSettingsHandler ( ) ;
16
17
const openInfo = useOpenInfoHandler ( ) ;
17
18
const openOnYoutube = useOpenOnYoutubeHandler ( ) ;
19
+ const { pauseVideo } = usePlaybackControl ( ) ;
18
20
const { t } = useTypedTranslation ( ) ;
19
21
return (
20
22
< div class = { styles . buttons } >
@@ -40,7 +42,10 @@ export function MobileButtons({ embed }) {
40
42
fill = { true }
41
43
buttonProps = { {
42
44
onClick : ( ) => {
43
- if ( embed ) openOnYoutube ( embed ) ;
45
+ if ( embed ) {
46
+ pauseVideo ( ) ;
47
+ openOnYoutube ( embed ) ;
48
+ }
44
49
} ,
45
50
} }
46
51
>
You can’t perform that action at this time.
0 commit comments