fix ios can autoplay bug (#640)

This commit is contained in:
mayeaux 2022-01-06 22:20:42 +01:00 committed by GitHub
parent a89cb17ce4
commit b822fbdac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -294,7 +294,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
useEffect(() => { useEffect(() => {
(async function() { (async function() {
// test if perms to play video are available // test if perms to play video are available
let canAutoplayVideo = await canAutoplay.video({ timeout: 2000 }); let canAutoplayVideo = await canAutoplay.video({ timeout: 2000, inline: true });
canAutoplayVideo = canAutoplayVideo.result === true; canAutoplayVideo = canAutoplayVideo.result === true;