Skip to content

Commit bbc955e

Browse files
committed
Enabled on mobile
1 parent d8d348e commit bbc955e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

special-pages/pages/duckplayer/app/components/MobileButtons.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { h } from 'preact';
22
import { useOpenInfoHandler, useOpenOnYoutubeHandler, useOpenSettingsHandler } from '../providers/SettingsProvider.jsx';
3+
import { usePlaybackControl } from './PlaybackControl.jsx';
34
import { useTypedTranslation } from '../types.js';
45
import { Button, Icon } from './Button.jsx';
56

@@ -15,6 +16,7 @@ export function MobileButtons({ embed }) {
1516
const openSettings = useOpenSettingsHandler();
1617
const openInfo = useOpenInfoHandler();
1718
const openOnYoutube = useOpenOnYoutubeHandler();
19+
const { pauseVideo } = usePlaybackControl();
1820
const { t } = useTypedTranslation();
1921
return (
2022
<div class={styles.buttons}>
@@ -40,7 +42,10 @@ export function MobileButtons({ embed }) {
4042
fill={true}
4143
buttonProps={{
4244
onClick: () => {
43-
if (embed) openOnYoutube(embed);
45+
if (embed) {
46+
pauseVideo();
47+
openOnYoutube(embed);
48+
}
4449
},
4550
}}
4651
>

0 commit comments

Comments
 (0)