player.js icon indicating copy to clipboard operation
player.js copied to clipboard

Android Webview can not play view in Vimeo

Open KirylAkulich1 opened this issue 1 year ago • 10 comments

Expected Behavior

Video should be played

Actual Behavior

video is not played.

Steps to Reproduce

Play video in web view. Literally few days ago videos worked well but now videos can not be played. Played only when user mute/unmute video.

KirylAkulich1 avatar Oct 02 '23 11:10 KirylAkulich1

Hi @KirylAkulich1 . Can you provide any more details about the context of this? Android/Webview version? A specific video or any video? Was it autoplay and autoplay stopped working without mute/unmute?

jdreetz avatar Oct 02 '23 12:10 jdreetz

Hi. We have tested on Android 12/13. WebView version - Android System WebView 117.0.5938.60. Unfortunately I can not provide any videos( It not even started to play. I tried to tap play button, but nothing happened.But If I set MediaPlaybackRequiresUserGesture setting to false - everything works. Do you have any idea why it could happen?

KirylAkulich1 avatar Oct 02 '23 13:10 KirylAkulich1

Was the same code working previously in earlier versions of the Webviews? What does you code look like?

jdreetz avatar Oct 02 '23 13:10 jdreetz

I can reveal some html element properties:

KirylAkulich1 avatar Oct 02 '23 13:10 KirylAkulich1

I have not updated web view. Previously video played correctly. Previously MediaPlaybackRequiresUserGesture flag was not used.

KirylAkulich1 avatar Oct 02 '23 13:10 KirylAkulich1

Are you able to see any debug information from the page loaded in the Webview? Like do you see any Javascript errors in the Javascript console for the page?

jdreetz avatar Oct 02 '23 13:10 jdreetz

Yes I am. I do not see any specific errors. image I get some errors if try to drag progress bar image

KirylAkulich1 avatar Oct 03 '23 06:10 KirylAkulich1

I have found a way to demo a problem:

https://github.com/vimeo/player.js/assets/62598669/0833181c-0336-47f0-8cea-4e2dbd66d0d5

Video plays only when it is muted. Code to reproduce https://codepen.io/KirylAkulich1/pen/WNLgzBK

KirylAkulich1 avatar Oct 03 '23 08:10 KirylAkulich1

I have found an interesting thing about playsinline=0& parameter. If I remove it then video is played fine in full/inline modes. So what we have now: If playsinline=0& is present in video url then video is played only if MediaPlaybackRequiresUserGesture is set to false in WebView settings. If playsinline=0& is not present then is played.

KirylAkulich1 avatar Oct 03 '23 09:10 KirylAkulich1

I have found an interesting thing about playsinline=0& parameter. If I remove it then video is played fine in full/inline modes. So what we have now: If playsinline=0& is present in video url then video is played only if MediaPlaybackRequiresUserGesture is set to false in WebView settings. If playsinline=0& is not present then is played.

Hey @KirylAkulich1, thanks for reporting this issue. I've added a ticket to our internal system to investigate. We'll reply to this issue when we have updates. Thanks!

jdreetz avatar Oct 19 '23 14:10 jdreetz