-
Notifications
You must be signed in to change notification settings - Fork 977
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
BUG: iOS cannot load dependencies when their link starts with //, it uses ionic: protocol instead of http: #3561
Comments
Hi @nmiticlevi9. Thanks for the bug report. Let me take a look at this and I'll let you know what I find. Thanks again! |
Hi @nmiticlevi9. First, I should inform you that we do not officially support the use of the player within some mobile frameworks, such as Ionic. I did, however, take a look at the repo you sent over and found that you can resolve the issue by adding a jwplayer('jwplayerid').setup({
// autostart: this.autoPlay,
autostart: false,
base: "https://ssl.p.jwpcdn.com/player/v/8.11.10/",
controls: true,
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
width: 400,
stretching: 'uniform',
aspectratio: '16:9',
sdkplatform: 'true',
}); Now, you would have to manually change the version number in the URL every time the player is updated so it's a bit of a hack, but it should work. Also, I noticed you were embedding the player by linking directly to the CDN. Please do not do this! You should embed the URL of a cloud-hosted player from your JW Player account. |
Thank you for a very fast response and for taking the time to actually look into the problem more in depth. I've tried using the base parameter but, when i do, then it fails to load jwpsrv.js, because it still tries to load it from And as for loading the jwplayer directly from CDN, yes in our actual app, we are using the url provided in our JWPlayer account, I just loaded the script directly from cdn because of example purposes. :) Thank you once again |
Sorry about that! I forgot that the You can workaround this by adding the following to your configuration: analytics: {
client: 'https://ssl.p.jwpcdn.com/player/v/8.11.10/jwpsrv.js'
} As for loading the player from the CDN - understood. Just wanted to make sure! |
Thanks a lot @waxidiotic, this really helped us out! |
I'll have to interfere here a bit more :D After loading the analytics client from predefined url, then it tries to fetch the Thank you once again for getting this close to fixing this |
I double-checked with an Engineer that is more familiar with the analytics plugin than I am and it looks like there wouldn't be a way to change the request for So this means two things:
|
You are completely right that it's better to have 1 failing request than to have a multiple ping.gif errors. We will go with this for now. Thank you very much for helping us get this as resolved as possible. Wish you all the best! |
Bug Report
[x] 4.x
Current behavior:
iOS Smartphones cannot lazily load jwplayer dependencies, because their links start with two slashes "//". The error code displayed in JWPlayer is (Error Code: 101104), which indicate that the dependencies were unable to load.
Expected behavior:
By default,
http
orhttps
protocols should be used to load dependencies from the internet.Steps to reproduce:
Here is a bug repro: https://github.com/nmiticlevi9/jwplayer-cordova-ionic4-http-issue
It is an empty
Ionic4
project, withJWPlayer
added.JWPlayer
tries to load it's dependencies using links such as this one://ssl.p.jwpcdn.com/player/v/8.11.1/jwpsrv.js
.Notice that the link starts with
//....
. This makes the app use the defaultionic:
protocol, instead ofhttps
orhttp
. This means that the request URL becomesionic://ssl.p.jwpcdn.com/player/v/8.11.1/jwpsrv.js
. Of course, those requests fail and the player is unable to load it's dependencies.The dependencies that are causing the problem are being constructed here (this snippet is from the prettified version of the
https://ssl.p.jwpcdn.com/player/v/8.11.10/jwplayer.js
)All the url's that are starting with "//" are failing to load because of the problem described above.
Ionic info:
Thank you JWPlayer team for all the work you've done,
Hopefully we will be able to resolve this issue as well!
The text was updated successfully, but these errors were encountered: