-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Added a default swf url #2533
Added a default swf url #2533
Conversation
Could we just default to the cdn url in the code? |
If we think it's worth it we could go back to that. I was trying to completely separate out the CDN logic from the core codebase. |
Just a comment from outside the box. ;-) I think it would be great to have the CDN as default fallback. Should be noted in the docs that this is relying on the CDN, but I think that most of the users would prefer having a default fallback which is already hosted over setting up their own one. |
@@ -13,6 +13,7 @@ import FlashRtmpDecorator from './flash-rtmp'; | |||
import Component from '../component'; | |||
import window from 'global/window'; | |||
import assign from 'object.assign'; | |||
import pkg from '../../../package.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkatsev can you check my sanity on this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this does mean we include the whole package.json inside of the output. We probably want to use something like https://www.npmjs.com/package/browserify-versionify instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was hoping to avoid another one of those... but it is better
Updated with @gkatsev's suggestions and tested. Appears to be working as it was before. |
// Otherwise this adds a CDN url. | ||
// The CDN also auto-adds a swf URL for that specific version. | ||
if (!options.swf) { | ||
let protocol = ('https:' === window.location.protocol ? 'https://' : 'http://'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just use a protocol relative url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Was copy/pasting from an old version. Fixed.
LGTM |
fixes #2488