Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricted playback on Ionic app #106

Open
UniSoundEcho opened this issue Mar 1, 2016 · 10 comments
Open

Restricted playback on Ionic app #106

UniSoundEcho opened this issue Mar 1, 2016 · 10 comments
Labels

Comments

@UniSoundEcho
Copy link

Hi,

I am using this API and it works fine, but there are certain videos like Vevo that are restricted from playing on Mobile device. I think this is not the fault of the APIrather the mobile device. There is no restriction when I run the ionic app in my browser. I bet there is a way to remove the restriction. Please help!!

@UniSoundEcho
Copy link
Author

This API is pretty much useless to me with so many restrictions. I have a couple recommended solutions below:

  1. Use https to request videos from youtube.
  2. wrap the directive in a browser.

@brandly
Copy link
Owner

brandly commented Mar 1, 2016

could you provide a link to a video that plays on mobile but doesn't play with this directive?

wrap the directive in a browser.

what do you mean by this?

@UniSoundEcho
Copy link
Author

@brandly @brandly @brandly @brandly
Anything Vevo or some other major copyright music
[https://www.youtube.com/watch?v=IdneKLhsWOQ]
I read from other websites that if you put the youtube API within an in-app browser, then there will be no restrictions. It is still not tested. I am not sure if it works.

I really hope that this API could work with any Youtube video on mobile devices. Do you have any idea how to solve this? Also, is this API requesting video with HTTPS header? or http

@fzschornack
Copy link

I have the same problem and I think the following is the reason:

"It means that your friend's website uses the HTTP protocol and can be identified by IP address as to where her website is. If that IP address has not been restricted by UMG - then no problem.

On the other hand - if your website use the "File" Protocol ( commonly used in Site Builders ) Then UMG can not detect where your website is. So in simple terms - your website is in a restricted region - or -and probably more likely - your website running "File" protocol - AKA - Developer Mode. Your website needs to be running on a Server ( AKA www or at least http)"

The Ionic App runs on mobile device using "file:///" and the browser/server using "http(s)://", that is why the problem occurs only in the mobile device.

@AtomSub
Copy link

AtomSub commented Mar 5, 2016

Some sites report using origin:"https://www.yoursite.com" in your playervars works. Didn't work for me. Stinks because my entire app relies on using overlays to improve music videos. Now I have to figure out an effective way to filter out vevo and other restricted videos. "embeddable" doesn't help because vevo are embeddable, just not for mobile. One other thing to check is uploading the app to a web server and running it from there. My app doesn't use any native functions, so that might work.

@UniSoundEcho
Copy link
Author

@fzschornack Thank you for your reply. So do you have a solution for this? Thank you!:)

@UniSoundEcho
Copy link
Author

@AtomSub I feel you. My app is totally useless with so many restrictions. So you mean I can try to set playvar origin:https://www.youtube.com? I am building a mobile app with Ionic Framework. I don't have a website. What should I put for the origin? Thx:)

@AtomSub
Copy link

AtomSub commented Mar 27, 2016

@UniSoundEcho You're supposed to put the url of your "website" and I think the purpose is to identify your site if you've been "whitelisted" by YouTube to embed these videos. I've tried different values though , with no success, so I can't really offer any advice.

@AtomSub
Copy link

AtomSub commented May 7, 2016

It worked on Android? Did you try multiple videos?
On May 7, 2016 8:24 AM, "Shamresh Khan" notifications@github.com wrote:

I just tried player-vars="{controls : 0, origin : 'https://www.youtube.com'}
and that worked.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#106 (comment)

@santoshvarma
Copy link

santoshvarma commented May 30, 2016

@AtomSub I tried with the following code but it is still giving the same error on android

player = new YT.Player(element.children()[0], { playerVars: { autoplay: 0, html5: 1, theme: "light", modesbranding: 0, color: "white", iv_load_policy: 3, showinfo: 1, controls: 0, origin : 'https://www.youtube.com' },

Can you share your code as itried lot of ways but none of them worked

@brandly brandly added the help label Jun 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants