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

Added a default swf url #2533

Closed
wants to merge 5 commits into from
Closed

Added a default swf url #2533

wants to merge 5 commits into from

Conversation

heff
Copy link
Member

@heff heff commented Sep 1, 2015

fixes #2488

The swf URL needs to be relative to the page (not video.js)
so this probably won't work for most, but it's the best we can do.
The CDN auto-adds a better swf URL for that specific version.
Otherwise you just need to set your swf location

@gkatsev
Copy link
Member

gkatsev commented Sep 1, 2015

Could we just default to the cdn url in the code?

@heff
Copy link
Member Author

heff commented Sep 1, 2015

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.

@moay
Copy link

moay commented Sep 2, 2015

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';
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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

@heff
Copy link
Member Author

heff commented Sep 3, 2015

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://');
Copy link
Member

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?

Copy link
Member Author

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.

@gkatsev
Copy link
Member

gkatsev commented Sep 3, 2015

LGTM

@heff heff closed this in 5624adb Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SWF Default in 5.0
3 participants