Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The video on Android stops after a few seconds to pause. #17

Open
Riabov54 opened this issue Mar 30, 2021 · 6 comments
Open

The video on Android stops after a few seconds to pause. #17

Riabov54 opened this issue Mar 30, 2021 · 6 comments

Comments

@Riabov54
Copy link

Riabov54 commented Mar 30, 2021

The first video on Android works fine, but each subsequent video is stoped immediately after the start to pause. The screen turns black. The focus is lost, and it is not possible to continue it manually. If you switch to another app and then return, the video waits for the manual continuation of viewing. This happened after the recent Google updates to WebView. How do I eliminate these pauses?
In config.xml recorded:
preference name="AllowInlineMediaPlayback" value="true"
preference name="MediaPlaybackRequiresUserAction" value="false"

@piotrmocek
Copy link

I'm trying to resolve same problem. Any thoughts on that?

@nadamai
Copy link

nadamai commented Apr 8, 2021

I have got exactly same problem. Updating WebView/Chrome according to this article:
https://www.xda-developers.com/google-confirms-webview-issue-crashing-android-apps/

does not work. Any help would be highly appreciated.

@nadamai
Copy link

nadamai commented Apr 9, 2021

I've found temporary solution. Its disadvantage is that the video does not open on fullscreen.

About the fix: YouTube API method createPlayVideoIntentWithOptions in src\com\bunkerpalace\cordova\YoutubeVideoPlayer.java seems to cause the problem. Setting 3rd argument to false (it turns off fullscreen) and going fullscreen manually may help to understand where the problem lays.

I've commented out YouTubeIntents.canResolvePlayVideoIntentWithOptions condition in createYoutubeIntent method and left the content from else clause, where the intent is created without YouTube API and it seems to work fine.

@Riabov54
Copy link
Author

Riabov54 commented Apr 9, 2021

The problem is full screen mode and hiding the user interface. If you click on the fullscreen icon while watching a video, the user interface appears and the next video goes without problems. I have tried the cordova-plugin-fullscreen plugin. This does not solve the problem. The video needs to be shown, but the user interface is present on the screen.

@santoshbadal1111
Copy link

On Android devices when we play youtube video for the first time it works perfectly but once we close video either by back button press or auto closes on video finish. now if we try to open the video on the same page then youtube video player is coming with black screen. It would be great if someone have already fixed it. Please help.

@jamesdss
Copy link

same issue here.. please help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants