Improve IOS inline experience

Also puts back the video js player which has rate support - but it's hidden on smaller devices...maybe someone can fix later on.
This commit is contained in:
Thomas Zarebczan 2020-10-29 14:33:38 -04:00 committed by Sean Yesmunt
parent 734e08a209
commit 9b38ba6c02

View file

@ -53,7 +53,6 @@ const VIDEO_JS_OPTIONS: VideoJSOptions = {
playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2], playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2],
responsive: true, responsive: true,
controls: true, controls: true,
html5: { nativeControlsForTouch: IS_IOS },
}; };
const F11_KEYCODE = 122; const F11_KEYCODE = 122;
@ -94,6 +93,8 @@ export default React.memo<Props>(function VideoJs(props: Props) {
autoplay: false, autoplay: false,
poster: poster, // thumb looks bad in app, and if autoplay, flashing poster is annoying poster: poster, // thumb looks bad in app, and if autoplay, flashing poster is annoying
plugins: { eventTracking: true }, plugins: { eventTracking: true },
'webkit-playsinline': IS_IOS,
playsinline: IS_IOS,
}; };
videoJsOptions.muted = startMuted; videoJsOptions.muted = startMuted;
@ -261,7 +262,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
return ( return (
reload && ( reload && (
// $FlowFixMe // $FlowFixMe
<div className={classnames('video-js-parent', { 'video-js-parent--ios': IS_IOS })} ref={containerRef}> <div className={classnames('video-js-parent')} ref={containerRef}>
<Button <Button
label={__('Tap to unmute')} label={__('Tap to unmute')}
button="link" button="link"