How can I link my private videos on YouTube to be played on my website? - youtube

How can I link my private videos on YouTube to be played on my website. The point is to bring more viewers to my site by making videos available on my site, yet private on YouTube.

You should set your videos to "unlisted" instead of "private". That
way the video does not show up on your channel or on any search
results but anyone with a link to the video can see it and you can
embed the video on any site.
I didn't try this workaround yet but theoretically it should work, you need to use YouTube API V 3 and follow the below steps:
Set the video's privacy status to unlisted through API.
Embed the video via API in a hidden div.
Use onPlayerStateChange event to check if the video player is currently playing the video, use the API to pause the video at the first second.
If the state changed to "playing" then send an AJAX request to a server side script to revert the the video's privacy status to be private, once you get a confirmation message display the video and use the API to play it.
This should keep the video private even if the user copy & paste the URL in another tab, s/he should get a message that the video is private.
References:
https://developers.google.com/youtube/iframe_api_reference?hl=en
PHP - How to change privacy status of a youtube video through Youtube API v3?

Related

Embedding private youtube video

I have a youtube account with some private videos and I want to embed those private videos in my website. Only users who are registered with my website and are logged in to my website should be able to see/play those videos. Also, It is required that they should not be able to open the video using the link in another tab without logging into my website, thus keeping the videos as unlisted is not an option. Any ideas? Thanks in Advance!
It's not possible, when a video is private on YouTube, only you can see the video.
Plus once the video is private you cannot emebed the video.
The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.
https://developers.google.com/youtube/iframe_api_reference
The only solution you have is to not use YouTue service but upload directly the video on your server and use the default HTML5 player. This way you can manage that only connected user can view the videos.

Am I separating, isolating or modifying the audio or video of a Youtube Video in my Android App?

I have a responsive website for kids. Kids can watch selected Youtube Videos in a webbrowser. To make ann Android app, I used an APK creator. This app shows my website in a fullscreen webviewer. I set it up to hide the addressbar, so kids can more safely brows the App (website). On the website are no external links, except the links from the Youtube player. The YouTube video's are loading with a normal Wordpress YouTube plugin. When hitting the YouTube logo or Video URL, the Youtube website wil show.
Now Google Plays said i am violating the rules of the YouTube Api:
"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;"
This I truely not understand. There is no way I want to violate anything. When I appeal for reinstatement the just saying:
"After further review, we are unable to reinstate your application. You can find out more information under Reason for Suspension in the initial removal notification from Google Play."
The initial removal notification said what I wrote above.

Can we PLay Youtube audio only inside app?

I am working on an app, where I am required to play the youtube's Audio and Video as well.
I am able to PLay video Using "XCDYouTubeVideoPlayerViewController" available on cocoa controls. (I am getting Youtube url from the backend)
Is there any way , where I can play audio also only inside my app. Because I checked over Internet and stackoverflow, but Couldn't find anything working.
And Is there any way, where the Video or audio can be played at the Back gorund , i.e when I press Home button the vidoe/audio keeps on playing.
All I fund on stack overflow is, that its forbidden, and the chances are your app will be blocked.
Please help, Thanks Again.
Youtube doesn't encourage audio only! here's what they have to say about this.
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: "separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API" -Kuan Yong, YouTube API Team
However there's a hacky workaround workaround whereby you can use a hidden UIWebView and play in that.

Google Play Web Video Player API

Is there an API for the Google Play online video playback of content? Would the YouTube API work?
I am wanting to embed Google Play content into a website I am building.
Thank you,
Joseph Irvine
Google Play movie purchases and rentals do also show up as YouTube videos (with a unique YouTube video ID), and so it is possible; obviously, you'd need to use oAuth2 authentication so when a user logs in, YouTube can verify that the user has the permission to see that film/TV show.
The real trick, however, is getting the right YouTube ID. They show up through search results via the search endpoint (so, for example, https://www.googleapis.com/youtube/v3/search?part=snippet&q=Monsters+University&key={YOUR_API_KEY} would be such a search), but that endpoint only gives you access to the "snippet" content type, which doesn't include the parameter "licensedContent" to let you know if it's a for-pay video (that parameter is found in the "contentDetails" type, which is only available from a video list call).

Youtube API - Video is not available

Is there any way to detect if a video was removed or unavailable?
We need to have ability to remove it from the video listing if it has been removed from youtube server.
Hung BUI if you are using youtube API there is a way to filter the video which has been removed or not availble in your locality.
Kindly watch this video and seek it to 2m:03s, The tutor will say how to filter the unavailable and restricted video,..
Youtube Video on YOUTUBE search API
Use a parameter format and restriction along with the youtube api endpoint
https://gdata.youtube.com/feeds/api/videos?q=GoogleDevelopers&max-results=1&v=2.1&alt=jsonc&format=5&restriction=DE
If you hit this endpoint of youtube you can get a set of youtube videos which can be embedded as well as we can check whether the video is restricted in our locality.

Resources