I created an Android App which loads a webpage via Webview into the app so you can access the content on a mobile device. On the webpage, I have placed a radio player using iframe and it works. But when I try to click on it to play in the app, it doesn't work. The play button isn't responding at all. If you can point me in the right direction, I would be glad.
The webpage in question is zeno.fm/repjesus-radio, incase you would like to have a feel of the player.
Related
I am using embedded YouTube videos in my React Native Expo application. The embedded videos are inside a WebView from react-native-webview. I am having a bit of a weird problem and I am not sure if it is on the YouTube side or React Native side of things.
When I try to click the play button on Android, I get the developer options on the YouTube video. The video does not play and I cannot "click out" of these options.
What the YouTube Embedded Video looks like inside the WebView when I press play
Even though I am clearly clicking in the center of the player on the play button, I get this menu. It seems like the Webview is either not responding well to user touch input or it thinks it is a longPress. I am not long pressing the video. When I strip my UI down to just the WebView taking up the entire screen, it works fine. On long press, I see this menu pop up. But clicking the play button everything works as expected.
It seems like once I reduce the size of the WebView (even though the YouTube player is not cut off or squished at all), it isn't responding properly. On iOS, everything is working fine.
Device Problem Occurs on
When I started to test on the Samsung Galaxy S7, I noticed this problem. Running the application on a Google Pixel 3 emulator appears to work as expected.
Here is the simple WebView with embedded YouTube video in it.
<WebView
allowsInlineMediaPlayback={true}
source={{ uri: "https://www.youtube.com/embed/WOi0vnzcEzA?playsinline=1&rel=0&mute=1autoplay=1&fs=0" }}
/>
Thanks
I ended up figuring out what was going on. I hope this may help someone in the future.
My WebView was wrapped inside a TouchableWithoutFeedback. For some reason (it is probably correct behavior but over my RN capabilities), it was "blocking" proper user input into the WebView. After I moved the WebView outside of the TouchableWithoutFeedback, everything worked as expected.
I am trying to make an application for Android TV where my use case is very simple. I want to display a content to user and when the user clicks a web view opens and a normal mp4 video (URL) loads.
However it does not start playing in Android TV, it straight away call the onPageFinished() and close the web view screen. It works well in Fire TV.
Do we have to include any other method to play it?
Link I am trying to play
Colleagues,
I embedded youtube video (autoplay, loop) under background (z-index:-1) in my website. Everything is ok when using desktop browser. But when website is opened in Android browser, youtube video isn't autoplaying. There is a play button, but I can't press it because it's under background. Is there any possibility to make that button available to press and start a video in Android or other mobile platforms?
Thank you.
I'm looking for a solution about YouTube in Android.
When my WebView in app connects an webpage, some pages may have embedded YouTube clip.
When I press the RED play button in the center of embedded clip, it plays well. Yes I set enabled JavaScript , plugins, hardware acceleration etc. But it ONLY plays in the WebView internal media player.
I've tried with several libraries such like YouTube API that provided by Google, but It just provides Views and interfaces, and cannot convert a YouTube clip in WebView to a YouTubeView (If you know how to convert, let me know).
All I want is simple. Hit a red play button in embedded YouTube, then my app launches YouTube App (or stock media player) so play the YouTube clip.
iPhone can do this very simply with the stock player, but I can't understand why Android can't do so.
Please check whether "YouTube" application is install on your device? If yes then just update it.And most of the time you tube application not working properly on emulator..
I'm developing an app with html, css and javascript which i port trough Phonegap to play on an Android tablet. (android 2.3.1 Gingerbread)
Everything is working fine, except the Youtube embed.
If i place the iframe embed on my page there is no play-button above my youtubescreen, so the user does not know he has to press it. But if you press it, the movie loads into the external android video playing app.
But here's the second problem; when the movie ends, the external android player closes and returns to my app, but then my youtube video screen is black en has these ugly android videocontrols of the external player.
But i can't do anything with it... so the user can't press the movie to watch it again.
Does anybody know how to implement a youtube video correctly into an HTML based android application?
It's HTML, so webviews, videoview, intents and things won't work...
Things i tried:
iframe embed
object embed
html5 video embed
online embed on external page
but in every attempt, those ugly videocontrols keep popping up after the video ended.
I also tried another player, but with the same result... Anyone ideas? :-)