Is possible to run (on Android/iOS) full screen youtube video on click on a link? I don't want click on a player. For example: clicking on url will open video on full screen.
You can create a new activity with a VideoView in it. VideoView accepts video links (they say it can play rtsp, which is what youtube mobile is using, but I have yet to try)
just do videoView.setVideoUri(rtsp://...);
Related
I'm trying to make an Android App and I need help.
Do you have any idea how to play a online video (like a video on Youtube) in side-by-side view at the very same time by using Android WebView?
so, when I watch a Youtube video, I want to be able to have two views on left and right side on My Android SmartPhone Screen, and play and control the same video both on left and right views at the very same time.
Regards.
----2nd Feb, edited----
following things I've tried and failed.
・using Youtube API, get 3gp address, and try to play it with VideoView
・Using draw method and getDrawingCache method of WebView
・using onShowCustomView of WebView
Look at using a html5 video player like Video.js or Sublime Video. You will need to create some javascript with each of these that fires the left and right video at the same time.
You can also look at what this guys did for some more inspiration.
http://html5demos.com/two-videos
The trick is getting the videos to fire at the same time if you need them in sync. It's not easy to achieve if you don't control the source video and server as you are relying on an outside party to do this. YouTube is NOT a good choice for serving your videos if you need them to be in sync as you can't guarantee the video load and launch times, or control if an ad will get injected into the video stream.
I am trying to play a video inside my app. Now as a source I only have the public URL of the video, e.g
www.youtube.com/watch?v=0OnPN6YxPuc
Can i use this to play the video inside the app, like using the videoView or MediaPlayer or something like that? The video can be from any provider, not specifically from Youtube e.g Vimeo, Dailymotion etc.
Currently i am using intent on click and it opens the browser or some app if installed and plays the video there. I want it to play inline. Webview is an option but the problem is Android v 4 > has good HTML5 support n bad Flash support, and <4 have good flash and bad HTMl5.
Is it the only option i have? Any pointers would be a great help.
The problem is using mediaelement.js to play "youtube source" on android phone chrome.
For example, I use the android phone's chrome(33.0.1750.136) open YouTube API Example and tap the left small playing button. The video doesn't load and duration is zero, but tap the big center playing button the video is fine.
In other case, when I use mediaelement.js and set code like mediaElement.play(); will get the same problem.
I want to find a method to control playing "youtube source" on android phone chrome by mediaelement.js.
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 would like to play a HTML5 video back to the user directly in the native android video player.
My current setup takes way too much effort to get into the native video player: Currently I have a WebView with an embedded HTML5 video (such as a Youtube or Vimeo HTML5, not flash, embed). The user has to hit play on the video, and then hit the fullscreen button (on far right in the picture below)
Then it opens in the native player which looks like this:
The native player is a View is a much better experience for video playback. (I believe it is a VideoView? though maybe it is different in newer versions of Android. It is a View within my Activity so provides extra control. See this post for more info.)
I'm looking for a graceful way of directly launching into this experience instead of having to load the embed in a WebView and then leaving it to the user to tap the full screen button.
Any ideas?
Thanks!