Using music videos through YouTube API in an android app - android

So I am working on an android app, which will stream music videos from YouTube API. I will implement ads in activities other than the one, where YouTube videos will be streaming. Wondering is it legally fine to go with this idea?

The terms should make it quite clear.
You agree not to use the YouTube API for any of the following
commercial uses unless You obtain YouTube's prior written approval:
the sale of the YouTube API, API Data, YouTube audiovisual content or
related services, or access to any of the foregoing;
the sale of
advertising, sponsorships, or promotions placed on or within the
YouTube audiovisual content or player; or
the sale of advertising,
sponsorships, or promotions on any page of the API Client containing
YouTube audiovisual content, unless other content not obtained from
YouTube appears on the same page and is of sufficient value to be the
basis for such sales.

Related

How to play YouTube videos in background in android?

I'm a beginner and I’m working on an android project in which I play youtube videos using Google YouTube data API.
Is it possible to play the video in the background even after the user has switched to another app or pressed the home button?
Is it possible to separate the audio from the video and stream that in the background?
I don't want to use web view.
It is possible to play the audio in the background.
However , you are not allowed to do so.
This violation of the Youtube API is cause for immidiate removal from the play store.
Official answer:
During review, we found that your app violates the Prohibited Actions provision of the Content Policy.
We have determined that your app enables background playing of YouTube videos, which is a violation of the YouTube API Terms of Service:
"Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: (8) separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;"
youtube red users only they possible to play youtube videos in background (https://support.google.com/youtube/answer/6308116?hl=en). You can check if they have this in the api,
its possible to play youtube videos in background if you open the desktop version of youtube in a browser.
Maybe you can make use of this by opening the correct link in a webview in background
Yes its possible and its easy. No installation, no root, no violations. Let me explain it.
Andriod 9 --> Settings --> Search Picture in Picture --> select YouTube --> Allow
Once Allow picture-in-picture is enabled. You can run YouTube in Background.
I got another idea, but not sure will it violate the rule.
You can build your own service base on youtube-dl. More explain step by step:
First you got the url of the video from Youtube
Second you extract the audio information from the origin video url, and you now get the audio source via youtube-dl
Play the audio source in the background
In this way you are not using the Youtube api directly, I think it's fine to only use the audio from the source and play it in the background.

Does YouTube Android Player API have a quota?

I was planning on using the Youtube Android Player API, when I noticed it needs a YouTube Data API (v3), API key: https://developers.google.com/youtube/android/player/register
The Youtube Data API handles most youtube's interaction, like getRating, upload video's, rate video's , get playlists etc, and sets a quota based on those actions: https://developers.google.com/youtube/v3/getting-started#quota & https://developers.google.com/youtube/v3/determine_quota_cost
None of these actions are video playback though, that's what the Android Player does. I also can't find anything about quotas on the Android Player API section.
So, my question is two-fold: Why does the player API need the Data API, and is there a quota on usage of the player API?
As far as I have researched on this.
The Google Developers Console allows creation of keys and then we restrict the key usage ourselves. This means that each key when created is a general key. It can be used for any Google API.
As far as YouTube player is concerned. As long as we don't make any calls to the YouTube API in our app, I don't think there is a quota limit. This is what I have concluded after reading this: https://developers.google.com/youtube/v3/getting-started#calculating-quota-usage
Also, since the player doesn't work until you have the YouTube app installed, it basically uses the app to play content. If you just show thumbnails, the thumbnails are already public and you can generate them this way: How do I get a YouTube video thumbnail from the YouTube API?
This API does not require an API key thus it does not affect the quota in any way.
This is an intuitive answer as per my research. I could not find any explanation anywhere so this is what I came up with.

Playing IMDB videos in my android app?

Is it possible to get url and stream and play movies trailor on my android application? i find some useful meterials that help me to play from youtube but due to some reason youtube is banned in my country. does imdb provides any API to doing this?
I don't believe there is an API that will allow you to retrieve trailer URLs directly; However you could use http://imdbapi.org/ to search for your movie and get the imdb_id field.
Once you have the imdb_id, you can have a webview in your app that loads the page http://m.imdb.com/title/imdb_id/videogallery which plays a trailer for the movie.

How to use Youtube Video Ads in the Youtube Android Player API?

The blog post that announces the new Android Video Player API states that the API is supporting YouTube ads. However in the documentation there is nothing about this ads.
How are YouTube ads incorporated in my App?
If the owners of the video have requested ad's and allowed embedding, the ad's will play. The owner of the content is who get's paid.
If you own the content, you can mark your content for ad's and allow embedding, and you'll get paid.

how to access youtube raw video file and play it in android youtube api

i want to display all the videos uploaded by a user, say cnn,
in my own android app, i will have a webview, and when user clicks on this video (cnn), it will play that particular youtube video in android's native video player, once video finishes, it will return to my app (webview where user lastly clicked)
my question is, which part of the google youtube data api should i feed to the intent? using the example below?
https://developers.google.com/youtube/2.0/developers_guide_protocol_understanding_video_feeds#Understanding_Video_Entries
can someone give me a CONCRETE example, no abbreviation or whatsoever, a link i should put in the intent?
i am confused because examples i found has .mp4 extension etc, which android will understand the intent that a video is requested to play.
but in the link provided above, there is no link to the raw file, i.e. no URI ends with .mp4
please help
By going thorough the documentation about youtube api and testing the demo App i think in-order make a app using youtube-api need
1) Developer key
2)Phone installed with latest version of youtube application (i think Actually youtube-api use some supports of youtube app to play video)
3)By using this api video will stay inside your app. but it use support from youtube app to play video
Note:- if am wrong Correct me

Categories

Resources