Detect Country Restrictions on Video
-
Hi, before embedding a video url into a post, a url typically from some of the supported websites such as YouTube, Vimeo or TikTok, it might be useful to know if your webpage viewers from other countries are able to play it. Could we then envisage a plugin with the capability of extracting the list of countries blocked by whoever generated the source video content?
The plugin would want to listen for paste operations in the edit form, (nothing like that here unfortunately) and then check through the string for candidate url(s). The url is then parsed for video provider names viz. the three mentioned above. Tricky, after which extract the video ids (regex at least), then, e.g. for YouTube, obtain the
regionCode
values that should accord to the region list. Present the county names in a tooltip, traytip or small popup flyout form overlay.There’s an example of how to extract some YT video data here, can the
regionCode
be obtained without the API key though? Another website that runs this page in quirks mode performs what we want with ease, cgi is more an Apache thing unfortunately.Haven’t researched this topic enough to be absolutely sure something like this has not been covered before, in any case, sure to be one for the backburner milestone.
Thanks.
- The topic ‘Detect Country Restrictions on Video’ is closed to new replies.