I want to know how to display a youtube video in a VideoView :
and the source is any youtube URL ??
You can use YouTube Android Player API to embed a YouTube video into your own app, they have sample app so it shouldn't be too difficult if you follow their steps.
You can easily display any YouTube Video directly in your app using YouTube API from Google. Check this link:
https://developers.google.com/youtube/v3/?hl=it
Here you can find sample applications too:
https://developers.google.com/youtube/android/player/sample-applications
Related
I have implemented the YouTube fragment and what I wanna do next is to get the video quality from YouTube Android API. But I didn't find any solution in API. I only want to get the video quality, I don't need to modify it. Any help is appreciated.
YouTube Android native api not providing video Quality functions. Although you can get video Quality using Iframe of YouTube api. You have to implement webview with Iframe. youtube Iframe api link
How do I show the list of "DAILYMOTION" videos in android?
Also how do I play them?
I am able to play single video, but I now want to show more than 25 videos in a list.
How can I do this?
This is more works than supposed to be on a simple stackoverflow question!
You can:
list videos using Dailymotion API (documentation here https://developer.dailymotion.com/api)
and then play them using the Dailymotion video player. Here you'll find the documentation about the Android Player SDK: https://developer.dailymotion.com/tools/sdks#sdk-android that is a thin wrapper around a WebView that allows to easily embed Dailymotion videos into your Android application. You can check the source code, documentation and sample app on the GitHub repo: https://github.com/dailymotion/dailymotion-sdk-android/tree/master.
There even is a sample app that may help you get started! https://github.com/dailymotion/dailymotion-sdk-android/tree/master/SampleApp
What is the best way to play a Youtube Video in my Android app ? I want to play the video in my app, and not in youtube's app.
I make some search with the VideoView, but it seems that it's obsolete now...
Have you some examples ?
Thanks
Download the Youtube Api Demo App, it shows how to use the Youtube Player API and the different ways to reproduce videos (using a YouTubePlayerView, using YoutubePlayerFragment, etc). However, it only shows how to display a video when you already know the id of the video.
If you want to search for a video and then display it. Then you need to learn how to use the Youtube Data Api. Here is an example of a request which returns a JSON response (just click "execute").
To use the Data Api from Android, you can use an HttpURLConnection object, or use the Youtube Data Api Client Library, that's up to you.
Once you have retrieved the video's data from the Youtube Data Api. Use the Youtube Player Api to display the videos.
In my android application I want to play youtube video in App, not in the default browser. I am trying this for the last some days. Previously I played the youtube video using the following code :
http://code.google.com/p/android-youtube-player/downloads/list
But now this code is not working. It shows "Sorry, this video cannot be played." I have tried all the possible solution mentioned in the different forum for this error. But could not be able to play the video.
That's why I am trying to find out another way to play the video in app. I have tried the RTSP link of a youtube video , it is playing the 3gp video file, but video quality is very poor. This is not acceptable.
I am really fade up to find out good solution to play youtube video in app.
Please help. Any good suggestion is always welcome.
Santanu
Playing YouTube videos in Android was made very simple with the release of this library: https://developers.google.com/youtube/android/player/. The Developer Guide on that page is a good resource on how to use this library. They also provide sample code on how to use the functionality provided by the library. The steps are basically:
Get a developer key
Download the library and include it in your project
Use the library to play videos (hint. use the YouTubePlayerView as a first step)
Please post again if you have any questions or need any code examples.
I play youtube video in videoview and I also face problem regarding video result.
Here some topics regarding this. One my friend suggest me use embeded URL instead of rtsp URL. Its give good result. For Example embeded URL example and how to implement it.
I am trying to play Youtube video's directly with in my applications in Android. If we give the direct links of the youtube like https://www.youtube.com/watch?v=HnbMYzdjuBs then the device displaying different applications that can open that link after clciking the video icon. If i use https://gdata.youtube.com/feeds/api/videos?q=flowers to fetch the links from Youtube XML services, the RTSP links are working perfectly with in the application but the quality is too bad.
How to fix this issue?
One more question is, i want to play a live video from Youtube. We have a youtube webservice to fetch the links(1,5,6 video types) of a specific vedio ID. We can use the below link to fetch the RTSP link for normal videos http://gdata.youtube.com/feeds/mobile/videos/ll4SoSJgLfI. Which is not working for Live Videos in Youtube. i am not getting the tag media-content. How to show the live streaming video from youtube on android devices ?