Video unavailable. Watch on Youtube problem - youtube-api

I have a problem about Youtube iOS SDK (youtube-ios-player-helper). I am able to use it in my iOS native code now and it's working fine.
The problem is there are some videos which unable to watch on the application. The video iframe shows this:
Youtube video problem
Can anyone find any ways to pass through it? Or maybe is there any parameters for the search API which filter those kinds of video out of my results?
My search API is https://www.googleapis.com/youtube/v3/search?part=snippet&q=Mật vụ bóng đêm&maxResults=50&type=video with region VN.
Thanks a lot for your help.

Related

How to cast a youtube video from ios using the iFrame API?

I want to cast a youtube video through my ios device to chromecast. I started by using Google's CastHelloText-ios sample application on github. However, I am having a lot of trouble finding the right documentation for this task.
Does anyone know how I can get started?
EDIT:
I've created some HTML/javascript code to handle the youtube iFrame api stuff. Using the HelloText sender app, I pass in a url to my HTML code. However I noticed that the youtube video starts to play for a while but immediately stops after a few seconds.
Does anyone know how I can get started
?
You can get started by checking out Integrate Cast v3 into your iOS App since you're using iOS.
The guide recommends that you try:
Cast iOS codelab
tutorial - Learn
step-by-step how to enable an existing iOS video app to use a Google
Cast device to cast videos to a TV.
CastVideos-ios sample
app (GitHub) - Run,
navigate and view this reference sample app which complies with the UX
Guidelines and Design Checklist.
Not sure if it will help but you may also checkout Embed YouTube Videos in iOS Applications with the YouTube Helper Library

How to make API request to Vimeo videos in iOS application?

I'm developing an iOS app(coded in Objective-c) which plays Vimeo videos. Its an In App Purchase application. I already have websites where users can buy videos. I have Vimeo PRO account. I don't know how to get direct link to those videos using Vimeo API.
Is requesting for videos part mine or it is done in back-end(in my case PHP)? So how to make API request to those videos I own in order to show them in my app? Thanks
Did you take a look at following url:
https://github.com/vimeo/VIMNetworking
If you still facing problem then I hope, it will give answer of all your problems.
Let me know if you have any other problem. I will try to solve it.

Unusual issue: Youtube iOS player helper "restricted from playback on certain sites." message, but works on Android

I know this question seems to have been asked before, but it apparently hasn't (at least on stack overflow). I get the following error using Youtube iOS helper api for certain videos when I attempt to embed them in my iOS app.
"This video contains content from VEVO. It is restricted from playback on certain sites."
The error below is fairly self explanatory... and it appears that there is nothing you can do about it. I can live with that. But there is more to it.
The reason I am puzzled by this message (and it refers to any VEVO music video on Youtube) is that the videos play on Android. Someone else has also had this problem... stated here: https://github.com/youtube/youtube-ios-player-helper/issues/52
If there is a restriction on other sites - and there may well be - it should be restricted on both iOS and Android devices. I find it highly odd that the restriction applies to only iOS.
Can someone advise?
Cheers!
add this in your playerVars #"origin" :#"http://www.youtube.com" it will work. I had the same problem.. i solved it using playvars
According to this answer,
...iOS devices use iframe so they basically embed. Android devices that
use player API can check syndicated.
From the documentation: if a video is embeddable, it can be embedded into a webpage, and if it is syndicated, it can be played outside of youtube.com.
A video that is embeddable but not syndicatable will play on YouTube.com or on other sites that embed the YouTube player, but may not play on devices such as mobile phones or TVs (source). Therefore, if a video plays on Android but not on iOS, it's possible that it's syndicateable but not embeddable, in which case it's working as intended.

Get streaming URL from any YouTube video

I know about how to play video in device. But Here I just want to know that is it possible to get streaming URL from any YouTube Video? Then how can I do it, I tried to search on google but I can not able to find my solution.
Generally I does not want to play direct stream from video, actually I want to save this URL (stream) in my buffer memory OR whatever temporary file and whenever user click on particular button then particular URL Stream is play.
Al Last I got YouTube APIs + iPhone = Cool mobile apps. But I am not sure that it's helpful in my case or not ? If anybody who worked on this API then please suggest me, Otherwise How can I get streaming URL.
Your suggestion will be appreciated.
Thanks in advance.
http://www.youtube.com/get_video_info?&video_id={VIDEO_ID}
This will not work on all files, some will display the message "This+video+contains+content+from.....". But many will work.
Is it possible to get streaming URL from any YouTube Video? - No, it is not possible without hurting the terms of service of youtube. Google has built the business model of youtube around the advertisements all over youtube, in-video banners and video ads and they want your user to see their ads. This is the reason they completely hide the video stream and would ban your app if you anyway access and stream it directly.
The only consented way to play youtube videos on iOS is to embed it into an iframe of a web view.

how to ensure that a youtube API response only contains videos that are suitable for playback on a mobile device

I am trying to add some youtube videos from my Admin page to database. So that mobile application can make use of them to play.
I want to filter the result from YouTube API link so that i can make sure that whatever videos i add to the database will be able to play on mobile devices like IOS and Android.
I tried
&format=5 and &format=1
but no use.
I also went through Youtube API v2.0 Docs but unable to find the correct way to assign fields parameter to my query string
can anyone guide me to fix this?
What you need is videoEmbeddable and videoSyndicated.
Here's my answer to original question: retrive only mobile-supported video from YouTube API

Resources