Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

CDN Fallback to Local


Is there a way to create a CDN failover to a local copy of jwplayer.js? I'm looking for a simple solution like the way jQuery is implemented:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/lib/jq/jquery.min.js"><\/script>')</script>

3 Community Answers

jherrieven

Best Answer 

You should be able to do this by simply replacing "window.jQuery" with "window.jwplayer"

James

View in conversation

jherrieven

Best Answer  User  
1 rated :

You should be able to do this by simply replacing "window.jQuery" with "window.jwplayer"

James

jherrieven

User  
0 rated :

(and of course replacing the urls to relevant JW library files)

mathew.a.corley

User  
0 rated :

Works great. :) I didn't think it was that simple, thanks Mr. Herrieven.

This question has received the maximum number of answers.