Skip to content

Commit

Permalink
@heff added back the default cdn url for the swf
Browse files Browse the repository at this point in the history
closes #2533
fixes #2488
  • Loading branch information
heff committed Sep 3, 2015
1 parent 63e21bd commit 5624adb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ CHANGELOG
* @gkatsev made the sass files available via npm in src/css ([view](https://github.com/videojs/video.js/pull/2546))
* @heff removed playerOptions from plugin options because it created an inconsistency in plugin inits ([view](https://github.com/videojs/video.js/pull/2532))
* @heff added a default data attribute to fix the progress handle display in IE8 ([view](https://github.com/videojs/video.js/pull/2547))
* @heff added back the default cdn url for the swf ([view](https://github.com/videojs/video.js/pull/2533))

--------------------

Expand Down
4 changes: 4 additions & 0 deletions grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ module.exports = function(grunt) {
['browserify-versionify', {
placeholder: '__VERSION_NO_PATCH__',
version: version.majorMinor
}],
['browserify-versionify', {
placeholder: '__SWF_VERSION__',
version: pkg.dependencies['videojs-swf']
}]
]
},
Expand Down
8 changes: 8 additions & 0 deletions src/js/tech/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ class Flash extends Tech {
createEl() {
let options = this.options_;

// If video.js is hosted locally you should also set the location
// for the hosted swf, which should be relative to the page (not video.js)
// Otherwise this adds a CDN url.
// The CDN also auto-adds a swf URL for that specific version.
if (!options.swf) {
options.swf = '//vjs.zencdn.net/swf/__SWF_VERSION__/video-js.swf';
}

// Generate ID for swf object
let objId = options.techId;

Expand Down

0 comments on commit 5624adb

Please sign in to comment.