How does YouTube determine user's region / location - youtube

My app lists and plays curated YouTube videos using youtube_ios_player_helper. Some videos are blocked in certain regions and I can't check all videos before displaying them to every user.
Every time a user tries to play a video that is blocked in their region, I'm informing my server to flag that video for that region. The only problem is that my methods of determining user's region are different from whatever YouTube uses and therefore I want to know what region YouTube thinks my user is in.

I think it uses your IP address. It is a fairly rapid an precise way of knowing where you are.

Related

Retrieving phone geolocation when user tap NFC chip?

I am developing a software to remotely manage NFC tags - change their actions and track campaign performance such as:
No. of taps on individual NFC chips
date and time of taps on individual NFC chips
location of NFC chips when tapped
When the user tap the NFC, they are directed to our server which then redirect the phone's browser to the designated destination set in the campaign.
I have completed all of the above except for the location one as it gives me the inaccurate location.
At the moment, I'm using the site http://ipinfodb.com + their API to get the phone ip address and supposedly location, but it's innacurate.
Another, more accurate approach would be to "get" the phone's location via the GPS but not sure how to approach this.
Any suggestions would be much appreciated.
Probably an easier solution would be to get the data out of an analytics backend such as Google Analytics (relying on their accuracy ...)
Otherwise you need to ask the user's permission - but that needs to be done on the web site acting as the redirection target, as otherwise you would break the flow.

iOS get user's frequent locations or figure out user's home location

Is it possible to get access to the frequent locations recorded on iOS devices, I'm trying to figure out where the user's home is without using backgrounding services in my own app itself.
You may not access frequent locations already recorded on iPhone. The basic rule is whenever you want to learn something about a user, you had to obtain an explicit permission first. And that makes a perfect sense to me, as a user.
This rule is equally applicable to all the bits and pieces of personal info like photos, address book records and locations. You have to initiate visit monitoring from your app, and you will have to obtain a permission to always use location services to initiate this kind of monitoring.

Brightscript: how to pull my Youtube videos from my own channel onto the Roku?

I'm making a youtube channel for some meteorologists who hired me for an internship.
They want to use Youtube to pull their videos and display them onto the Roku Channel. How would I do this? also, I need to make a list of the videos from the youtube channel. one more thing if anyone knows how to pull information from a website that would be wonderful.
We have to figure out how to pull information for weather services and we have a few websites that use XML and RSS data tables, but theres so many different Weather stations that it would be a frustration to write so many If statements to contain those stations. is there a way to find their local weather station? If only one of these questions can be answered, I would prefer it be how to pull videos from youtube and play them on your channel.
While there are ways to pull YouTube videos for playback on Roku, it is disallowed by the YouTube Terms of Service. If you want to stream videos, you'll need to host them on your own CDN.
Per the YouTube TOS, Section 4.C.:
You agree not to access Content through any technology or means other than the video playback pages of the Service itself, the Embeddable Player, or other explicitly authorized means YouTube may designate.
As for weather services, you'll need to provide more information on what you're trying to do. Most weather services (e.g., Weather Channel, Weather Underground, AccuWeather, etc.) have APIs that can identify the user's location based on IP address, but these services typically cost money, especially if you intend to use them in a commercial application.

What is meant by 'separate, isolate, or modify the audio or visual components' in YouTube's API Terms of Service?

I'm trying to learn more about YouTube's TOS. More specifically:
II. Prohibitions
8: separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;
I'm working inside of a Google Chrome Extension which consists of a persistant background page and a foreground pop-up page. I would like to display audiovisual content in the foreground to users. This is fine and works, however, upon closing the foreground -- the audiovisual content ceases because the page has been destroyed.
As such, I would like to sync two YouTube players such that one in the background is unmuted with the one in the foreground being muted, but with its visual content sync'ed to that of the background. Would this violate YouTube's TOS? I'm hoping the answer is no - it seems akin to having a tab open. Sometimes the visual content can be seen (at the user's discretion) but the audio content would be uninterrupted.
Thanks
If I interpret that correctly:
"to separate or isolate" means to cut off the video or the audio part (or even different channels of it, if any) of the returned/streamed media
"to modify" means that you transform the data in some way and you display it to the user, instead of the original data (i. e. you are prohibited to make a video streaming application that displays every movie in black and white).
So, unfortunately, I think your requirement does indeeed violate the TOS.
In short:
There's no way for you to make an app that allows you to listen to a youtube song with your display off...
(I believe they want you to see the ads or they want to prove to those who pay them to put the ads that people sees the ads they put on all youtube videos).

Youtube API Java client library - How check if a video entry is available for mobile?

I have a content management server application written in Java. A background process goes through a list of video ids and fetches the details for those video ids using Youtube API.
I would like to check if a particular video entry is available for mobile or not.
I checked syndicate allowed like
String videoEntryUrl = "http://gdata.youtube.com/feeds/api/videos/"+videoID;
VideoEntry videoEntry = service.getEntry(new URL(videoEntryUrl), VideoEntry.class);
if(!videoEntry.getXmlBlob().getBlob().contains("yt:accessControl permission='denied' action='syndicate'")){
System.out.println("The video is syndicatable");
}
Checking for syndicate still not solved the problem and the server still lets in videos that cannot play on Android phone.
What is the right way to filter only the videos that can be played on mobile?
There's no single check to see whether a video is playable "on mobile".
There are a variety of different reasons why a particular video might not be playable on a particular platform, and unfortunately the only way to be absolutely sure whether a particular video will play in a particular player is to attempt to play it.
That being said, this blog post goes into more details about the types of common playback restrictions that crop up: http://apiblog.youtube.com/2011/12/understanding-playback-restrictions.html

Resources