mirror of
https://github.com/videojs/video.js.git
synced 2025-04-07 07:19:54 +02:00
commit
18c3853039
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,7 @@ projects
|
||||
.zenflow-log
|
||||
test/*.map
|
||||
.bunyipconfig.js
|
||||
.s3config.json
|
||||
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
50
CHANGELOG2.md
Normal file
50
CHANGELOG2.md
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
```
|
||||
^ NEW CHANGES ABOVE ^
|
||||
```
|
||||
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
#### 3.2.3 (2013-05-03)
|
||||
* test line
|
||||
* Added a plugins interface
|
||||
* Added automated test suite and support for Travis CI.
|
||||
* Updated docs to use Github markdown
|
||||
* Allow disabling of default components
|
||||
* Duration is now setable (need ed for HLS m3u8 files)
|
||||
* Event binders (on/off/one) now return the player instance
|
||||
* Stopped player from going back to beginningg on ended event.
|
||||
* Added support for percent width/height and fluid layouts
|
||||
* Improved load order of elements to reduce reflow.
|
||||
* Changed addEvent function name to 'on'.
|
||||
* Removed conflicting array.indexOf function
|
||||
* Added exitFullScreen to support BlackBerry devices (pull/143)
|
||||
|
||||
## 5.0.0 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
* Added automated test suite and support for Travis CI.
|
||||
* Updated docs to use Github markdown
|
||||
* Allow disabling of default components
|
||||
|
||||
#### 4.1.2 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
|
||||
### 4.1.0 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
* Added automated test suite and support for Travis CI.
|
||||
* Updated docs to use Github markdown
|
||||
* Allow disabling of default components
|
||||
|
||||
#### 4.0.2 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
|
||||
#### 4.0.1 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
|
||||
## 4.0.0 (2013-02-02)
|
||||
* Added a plugins interface ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
|
||||
* Added automated test suite and support for Travis CI.
|
||||
* Updated docs to use Github markdown
|
||||
* Allow disabling of default components
|
||||
|
124
Gruntfile.js
124
Gruntfile.js
@ -1,6 +1,23 @@
|
||||
module.exports = function(grunt) {
|
||||
var pkg, s3, semver, version, verParts;
|
||||
|
||||
var pkg = grunt.file.readJSON('package.json');
|
||||
semver = require('semver');
|
||||
pkg = grunt.file.readJSON('package.json');
|
||||
|
||||
try {
|
||||
s3 = grunt.file.readJSON('.s3config.json');
|
||||
} catch(e) {
|
||||
s3 = {};
|
||||
}
|
||||
|
||||
verParts = pkg.version.split('.');
|
||||
version = {
|
||||
full: pkg.version,
|
||||
major: verParts[0],
|
||||
minor: verParts[1],
|
||||
patch: verParts[2]
|
||||
};
|
||||
version.majorMinor = version.major + '.' + version.minor;
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
@ -12,18 +29,10 @@ module.exports = function(grunt) {
|
||||
baseDir: 'src/js/'
|
||||
}
|
||||
},
|
||||
deps: {
|
||||
src: 'src/js/dependencies.js',
|
||||
options: {
|
||||
baseDir: 'src/js/'
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
build: ['build/files/*'],
|
||||
dist: ['dist/*']
|
||||
},
|
||||
// Current forEach issue: https://github.com/gruntjs/grunt/issues/610
|
||||
// npm install https://github.com/gruntjs/grunt-contrib-jshint/archive/7fd70e86c5a8d489095fa81589d95dccb8eb3a46.tar.gz
|
||||
jshint: {
|
||||
src: {
|
||||
src: ['src/js/*.js', 'Gruntfile.js', 'test/unit/*.js'],
|
||||
@ -53,6 +62,42 @@ module.exports = function(grunt) {
|
||||
watch: {
|
||||
files: [ 'src/**/*.js', 'test/unit/*.js' ],
|
||||
tasks: 'dev'
|
||||
},
|
||||
copy: {
|
||||
minor: {
|
||||
files: [
|
||||
{expand: true, cwd: 'build/files/', src: ['*'], dest: 'dist/'+version.majorMinor+'/', filter: 'isFile'} // includes files in path
|
||||
]
|
||||
},
|
||||
patch: {
|
||||
files: [
|
||||
{expand: true, cwd: 'build/files/', src: ['*'], dest: 'dist/'+version.full+'/', filter: 'isFile'} // includes files in path
|
||||
]
|
||||
}
|
||||
},
|
||||
s3: {
|
||||
options: s3,
|
||||
prod: {
|
||||
// Files to be uploaded.
|
||||
upload: [
|
||||
{
|
||||
src: 'dist/cdn/*',
|
||||
dest: 'vjs/'+version.full+'/',
|
||||
rel: 'dist/cdn/',
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000'
|
||||
}
|
||||
},
|
||||
{
|
||||
src: 'dist/cdn/*',
|
||||
dest: 'vjs/'+version.majorMinor+'/',
|
||||
rel: 'dist/cdn/',
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=2628000'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -61,6 +106,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-s3');
|
||||
grunt.loadNpmTasks('contribflow');
|
||||
|
||||
// Default task.
|
||||
@ -89,7 +135,7 @@ module.exports = function(grunt) {
|
||||
|
||||
// grunt.file.write('build/files/sourcelist.txt', sourceList.join(','));
|
||||
// Allow time for people to update their index.html before they remove these
|
||||
grunt.file.write('build/files/sourcelist.js', 'var sourcelist = ["' + sourceFiles.join('","') + '"]');
|
||||
// grunt.file.write('build/files/sourcelist.js', 'var sourcelist = ["' + sourceFiles.join('","') + '"]');
|
||||
|
||||
// Create a combined sources file. https://github.com/zencoder/video-js/issues/287
|
||||
var combined = '';
|
||||
@ -101,6 +147,14 @@ module.exports = function(grunt) {
|
||||
grunt.file.copy('src/css/video-js.css', 'build/files/video-js.css');
|
||||
grunt.file.copy('src/css/video-js.png', 'build/files/video-js.png');
|
||||
grunt.file.copy('src/swf/video-js.swf', 'build/files/video-js.swf');
|
||||
// grunt.file.copy('src/css/font/', 'build/files/font/');
|
||||
|
||||
grunt.file.recurse('src/css/font', function(absdir, rootdir, subdir, filename) {
|
||||
// Block .DS_Store files
|
||||
if ('filename'.substring(0,1) !== '.') {
|
||||
grunt.file.copy(absdir, 'build/files/font/' + filename);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
grunt.registerMultiTask('minify', 'Minify JS files using Closure Compiler.', function() {
|
||||
@ -155,26 +209,48 @@ module.exports = function(grunt) {
|
||||
});
|
||||
|
||||
grunt.registerTask('dist', 'Creating distribution', function(){
|
||||
// TODO: create semver folders (4.1.1, 4.1, 4, and latest)
|
||||
// grunt copy could be used but is currently broken and needs an update
|
||||
var exec = require('child_process').exec;
|
||||
var done = this.async();
|
||||
|
||||
grunt.file.copy('build/files/minified.video.js', 'dist/video-js/video.js');
|
||||
grunt.file.copy('build/files/combined.video.js', 'dist/video-js/video.dev.js');
|
||||
grunt.file.copy('build/files/video-js.css', 'dist/video-js/video-js.css');
|
||||
grunt.file.copy('build/files/video-js.png', 'dist/video-js/video-js.png');
|
||||
grunt.file.copy('build/files/video-js.swf', 'dist/video-js/video-js.swf');
|
||||
grunt.file.copy('build/demo-files/demo.html', 'dist/video-js/demo.html');
|
||||
grunt.file.copy('build/demo-files/demo.captions.vtt', 'dist/video-js/demo.captions.vtt');
|
||||
|
||||
// Copy is broken. Waiting for an update to use.
|
||||
// copy: {
|
||||
// latest: {
|
||||
// files: [
|
||||
// { src: ['dist/video-js'], dest: 'dist/latest' } // includes files in path
|
||||
// // {src: ['path/**'], dest: 'dest/'}, // includes files in path and its subdirs
|
||||
// // {expand: true, cwd: 'path/', src: ['**'], dest: 'dest/'}, // makes all src relative to cwd
|
||||
// // {expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'} // flattens results to a single level
|
||||
// ]
|
||||
// }
|
||||
// },
|
||||
grunt.file.recurse('build/files/font', function(absdir, rootdir, subdir, filename) {
|
||||
// Block .DS_Store files
|
||||
if ('filename'.substring(0,1) !== '.') {
|
||||
grunt.file.copy(absdir, 'dist/video-js/font/' + filename);
|
||||
}
|
||||
});
|
||||
|
||||
// CDN version uses already hosted font files
|
||||
// Minified version only
|
||||
// doesn't need demo files
|
||||
grunt.file.copy('build/files/minified.video.js', 'dist/cdn/video.js');
|
||||
grunt.file.copy('build/files/video-js.css', 'dist/cdn/video-js.css');
|
||||
grunt.file.copy('build/files/video-js.swf', 'dist/cdn/video-js.swf');
|
||||
|
||||
|
||||
|
||||
var css = grunt.file.read('dist/cdn/video-js.css');
|
||||
css = css.replace(/font\//g, '../f/1/');
|
||||
grunt.file.write('dist/cdn/video-js.css', css);
|
||||
|
||||
exec('cd dist && zip -r video-js-'+version.full+'.zip video-js && cd ..', { maxBuffer: 500*1024 }, function(err, stdout, stderr){
|
||||
|
||||
if (err) {
|
||||
grunt.warn(err);
|
||||
done(false);
|
||||
}
|
||||
|
||||
if (stdout) {
|
||||
grunt.log.writeln(stdout);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "3.2.3",
|
||||
"version": "4.0.0",
|
||||
"copyright": "Copyright 2013 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE",
|
||||
"keywords": [
|
||||
"html5",
|
||||
@ -28,7 +28,9 @@
|
||||
"grunt-contrib-clean": "~0.4.0a",
|
||||
"grunt-contrib-copy": "~0.3.2",
|
||||
"mocha": "~1.8.1",
|
||||
"contribflow": "~0.2.0"
|
||||
"contribflow": "~0.2.0",
|
||||
"grunt-s3": "~0.2.0-alpha",
|
||||
"semver": "~1.1.4"
|
||||
},
|
||||
"testling": {
|
||||
"browsers": [
|
||||
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
@ -3,15 +3,6 @@ VideoJS Default Styles (http://videojs.com)
|
||||
Version GENERATED_AT_BUILD
|
||||
*/
|
||||
|
||||
@font-face{
|
||||
font-family:'VideoJS';
|
||||
src:url('./font/VideoJS.eot');
|
||||
src:url('./font/VideoJS.eot') format('embedded-opentype'),
|
||||
url('./font/VideoJS.woff') format('woff'),
|
||||
url('./font/VideoJS.ttf') format('truetype');
|
||||
font-weight:normal;
|
||||
font-style:normal }
|
||||
|
||||
/*
|
||||
REQUIRED STYLES (be careful overriding)
|
||||
================================================================================ */
|
||||
@ -158,6 +149,16 @@ so you can upgrade to newer versions easier. You can remove all these styles by
|
||||
|
||||
/* Base UI Component Classes
|
||||
-------------------------------------------------------------------------------- */
|
||||
@font-face{
|
||||
font-family: 'VideoJS';
|
||||
src: url('font/vjs.eot');
|
||||
src: url('font/vjs.eot') format('embedded-opentype'),
|
||||
url('font/vjs.woff') format('woff'),
|
||||
url('font/vjs.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.vjs-default-skin {
|
||||
color: #ccc;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Loading…
x
Reference in New Issue
Block a user