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

Not playing video and audio. #201

Open
ShubhGar opened this issue Jun 20, 2020 · 9 comments
Open

Not playing video and audio. #201

ShubhGar opened this issue Jun 20, 2020 · 9 comments

Comments

@ShubhGar
Copy link

Please check for Xr4H_bV8Raw, It is not playing. Working fine with later UIWebview version, but not working with current Wkwebview version. Please check and resolve issue soon.

@ankit0812
Copy link

ankit0812 commented Jun 21, 2020

+1
The actual issue is that the player opens but the audio and video are not coming while the timer proceeds normally.

@ankit0812
Copy link

@gilesvangruisen any updates on this as it is coming on more videos now.

1 similar comment
@ShubhGar
Copy link
Author

ShubhGar commented Jul 4, 2020

@gilesvangruisen any updates on this as it is coming on more videos now.

@gilesvangruisen
Copy link
Owner

Hi @ShubhGar thanks for reporting this. I can’t quite see what might be unique about that video, and my only guess is that YouTube has been locking down uses of the Iframe API. Are you able to play them in mobile Safari?

It might be helpful to see more of the videos that you say are not playing properly to try and determine if there is something unique about all of them that might be causing this. Otherwise, I’d recommend searching around for others having the same issue with the Iframe API in WebKit. This library is only a simple wrapper around a web view, so I’m unsure what would be causing the issue here.

@ShubhGar
Copy link
Author

ShubhGar commented Jul 4, 2020

@gilesvangruisen Thanks for reply, yes, video work fine in safari.I will share some more video too.

@ShubhGar
Copy link
Author

Hi @gilesvangruisen its not working for lots of video now. check videoid aDmywEFC_YE

@engin7
Copy link

engin7 commented Dec 9, 2022

Hi @ShubhGar those videos you shared playing my side.
@gilesvangruisen Id with "5geiimgNBCQ" not playing.

@engin7
Copy link

engin7 commented Dec 9, 2022

htmlString:

<!--\n Copyright 2014 Google Inc. All rights reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n -->\n<!DOCTYPE html>\n<html>\n <head>\n <style>\n * { margin: 0; padding: 0; }\n html, body { width: 100%; height: 100%; }\n </style>\n </head>\n <body>\n <div id=\"player\"></div>\n <script src=\"https://www.youtube.com/iframe_api\"></script>\n <script>\n var player;\n YT.ready(function() {\n player = new YT.Player(\'player\', {\n \"width\" : \"100%\",\n \"playerVars\" : {\n \"playsinline\" : 1\n },\n \"events\" : {\n \"onReady\" : \"onReady\",\n \"onStateChange\" : \"onStateChange\",\n \"onPlaybackQualityChange\" : \"onPlaybackQualityChange\",\n \"onError\" : \"onPlayerError\"\n },\n \"height\" : \"100%\",\n \"videoId\" : \"5geiimgNBCQ\"\n});\n window.location.href = \'ytplayer://onYouTubeIframeAPIReady\';\n });\n function onReady(event) {\n window.location.href = \'ytplayer://onReady?data=\' + event.data;\n }\n\n function onStateChange(event) {\n window.location.href = \'ytplayer://onStateChange?data=\' + event.data;\n }\n\n function onPlaybackQualityChange(event) {\n window.location.href = \'ytplayer://onPlaybackQualityChange?data=\' + event.data;\n }\n function onPlayerError(event) {\n window.location.href = \'ytplayer://onError?data=\' + event.data;\n }\n </script>\n </body>\n</html>

@engin7
Copy link

engin7 commented Dec 9, 2022

#162 (comment)

this fixed my problem

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

4 participants