I'm using the YouTube API to retrieve videos for and Android client.
The program works well but sometimes I get an error like "this video is not allowed to run on smartphones".
So, there is a way to filter that videos? I read this doc but did not find a solution.
There are two concepts embeddable and syndicated.
iOS devices use iframe so they basically embed.
Android devices that use player API can check syndicated.
When you do a search->list, you can set videoEmbeddable and videoSyndicated to true.
For Android, you should check videoSyndicated.
Or if you are iterating through videos, for each video, you can do a video->list call with video id and check status.embeddable in the response.
Here is a blog post about this topic, even though examples are in v2, information is still relevant.
Related
I have a tricky question regarding the MediaPlayer class.
I would like to find a way to play MORE than ONE online song. I though of doing it with soundcloud, but clearly the website of a playlist will not work out.
Therefore I thought of adding several string referring to single songs on soundcloud by deploying the ".setDataSource" but the app crashes, aka I cant have more than one string.
Hence, I tried with only one, but the single song's page from SoundCloud does not work either. Apparently it only works with online mp3.
Now, getting online .mp3 lawfully is rather hard nowadays and I was looking for a way to play mp3 (or m3u) from an authorised website or possibly even a playlist.
Any ideas?
Use the Google's ExoPlayer , its powerful, flexible and supports adaptive streaming. You can get to know more about it in here, also the github page.
Is there any example in Android for retrieving all video play-list of particular user or you can say channel, Because I have tried so much and also reads docs
https://developers.google.com/youtube/v3/code_samples/java
but did not getting accurate example for Android,
Any body have done then please suggest me
Thanks
Recently I retrieve the information of videos which should be played on the Android apps with Youtbe V3 API. The problem is some of them are not avaliable on the mobile device. And I found no related property according to the document. Is it possible for me to filter out those videos? Or should I add any header within http request?
There are two concepts embeddable and syndicated.
iOS devices use iframe so they basically embed.
Android devices that use player API can check syndicated.
When you do a search->list, you can set videoEmbeddable and videoSyndicated to true.
Or if you are iterating through videos, for each video, you can do a video->list call with video id and check status.embeddable in the response.
Here is a blog post about this topic, even though examples are in v2, information is still relevant.
I did google about this question and I found 4 possible ways to do it:
play the video with the following manner:
startActivity(newIntent(Intent.ACTION_VIEW,Uri.parse(uri)));
Get the RTSP link and play the video with VideoView
play the video using Flash
Using HTML5 iframe
I have an android 4.0 device and I am able to play YouTube videos using the first three methods. My question is: which method is the most adaptable to different version. If the answer is using HTML5, how can I do it. Thank you very much for your time.
The most allround way of doing it to open it with a URI parse. There is also a way of forcing the YouTube app to be called(sorry I think I read it someplace but I do not remember how) and show the video there. This means you do not get the option to chose to open the video in the browser.
The rest of the alternatives are only supported by some devices. (Flash is outdated, HTML5 is not supported on most devices). I you are going to do something else then using the buildt-in YouTube app I would recomend RTSP as the best option.
I everyone I’m currently in the process of creating an Android application for my YouTube channel. I was wondering if anyone knew if there was any way to check for a new video uploads so I could use it to trigger a notification within my application.
Thank you for any help.
You may want to use the Youtube API. Although im not sure how well the GData-API for YouTube is supported on Android (or if it supports checking for videos at all, never used it myself).
Take a look here and see if you can find something.
Or you could load and parse the RSS-Feed at
http://www.youtube.com/rss/user/YOURCHANNELNAME/videos.rss.
Since RSS is XML based, that is certainly possible.