fix plays inline bug on ios (#1723)

This commit is contained in:
mayeaux 2022-06-21 15:55:25 +02:00 committed by GitHub
parent 56ce70cef5
commit d50f51bd3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,9 +314,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
}); });
} }
// set playsinline for mobile
player.children_[0].setAttribute('playsinline', '');
// immediately show control bar while video is loading // immediately show control bar while video is loading
player.userActive(true); player.userActive(true);
@ -432,6 +429,8 @@ export default React.memo<Props>(function VideoJs(props: Props) {
vjsPlayer.poster(poster); vjsPlayer.poster(poster);
vjsPlayer.el().childNodes[0].setAttribute('playsinline', '');
let contentUrl; let contentUrl;
// TODO: pull this function into videojs-functions // TODO: pull this function into videojs-functions
// determine which source to use and load it // determine which source to use and load it