Comparar commits

..

5 Commits

Autor SHA1 Mensagem Data
Steve Heffernan 6fe5513f30 Bump version to 4.0.4 2013-06-11 15:27:49 -07:00
Steve Heffernan 138b1381c2 Adding line to CHANGELOG 2013-06-11 15:25:40 -07:00
Steve Heffernan 60d389e1f8 Close GH-571: Add analtyics to current CDN version. Fixes #568 2013-06-11 15:25:19 -07:00
Steve Heffernan 880be64f48 Bump version to 4.0.3 2013-05-28 15:31:11 -07:00
Steve Heffernan 753ce48e21 Close GH-546: Fix for exit-fullscreen bug in 4.0. fixes #497. 2013-05-28 15:29:42 -07:00
10 arquivos alterados com 117 adições e 51 exclusões
+5
Ver Arquivo
@@ -68,3 +68,8 @@ CHANGELOG
---- 3.2.3 / 2012-11-12 / fix-chrome-seeking-spinner ---------------------------
* Fixed chrome spinner continuing on seek
* Added google analytics to current version of CDN ([view](https://github.com/videojs/video.js/pull/571))
--------------------
undefined
+9 -2
Ver Arquivo
@@ -1,8 +1,9 @@
module.exports = function(grunt) {
var pkg, s3, semver, version, verParts;
var pkg, s3, semver, version, verParts, uglify;
semver = require('semver');
pkg = grunt.file.readJSON('package.json');
uglify = require('uglify-js');
try {
s3 = grunt.file.readJSON('.s3config.json');
@@ -233,7 +234,7 @@ module.exports = function(grunt) {
grunt.registerTask('dist', 'Creating distribution', function(){
var exec = require('child_process').exec;
var done = this.async();
var css, jsmin, jsdev;
var css, jsmin, jsdev, cdnjs;
// Manually copy each source file
grunt.file.copy('build/files/minified.video.js', 'dist/video-js/video.js');
@@ -263,6 +264,12 @@ module.exports = function(grunt) {
css = css.replace(/font\//g, '../f/1/');
grunt.file.write('dist/cdn/video-js.css', css);
// Add CDN-specfic JS
jsmin = grunt.file.read('dist/cdn/video.js');
// GA Tracking Pixel (manually building the pixel URL)
cdnjs = uglify.minify('src/js/cdn.js').code.replace('v0.0.0', 'v'+version.full);
grunt.file.write('dist/cdn/video.js', jsmin + cdnjs);
// Zip up into video-js-VERSION.zip
exec('cd dist && zip -r video-js-'+version.full+'.zip video-js && cd ..', { maxBuffer: 500*1024 }, function(err, stdout, stderr){
+5 -3
Ver Arquivo
@@ -1,6 +1,8 @@
{
"owner": "videojs",
"project": "video.js",
"developmentBranch": "master",
"releaseBranch": "stable",
"remote": "origin",
"upstream": "zencoder"
}
"remote": "origin"
}
+1 -1
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "4.0.2",
"version": "4.0.4",
"copyright": "Copyright 2013 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE",
"keywords": [
"html5",
+5
Ver Arquivo
@@ -9,6 +9,11 @@
<!-- LOAD VIDEO.JS SOURCE FILES IN ORDER -->
<script src="../build/source-loader.js"></script>
<!-- Set the location of the flash SWF -->
<script>
vjs.options.flash.swf = '../src/swf/video-js.swf'
</script>
</head>
<body>
<p style="background-color:#eee; border: 1px solid #777; padding: 10px; font-size: .8em; line-height: 1.5em; font-family: Verdana, sans-serif;">You can use /sandbox/ for writing and testing your own code. Nothing in /sandbox/ will get checked into the repo, except files that end in .example, so please don't edit or add those files. To get started make a copy of index.html.example and rename it to index.html.</p>
+56
Ver Arquivo
@@ -0,0 +1,56 @@
/**
* Google Analytics tracking pixel for the freely hosted version of Video.js
* at vjs.zencdn.net. We'll use this data to develop a support matrix of
* browsers and devices, and possibly track errors.
*
* This code generates the GA tracking URL without requiring the GA javascript
* library.
*
* @type {Image}
*/
;(function(i,w,n,e,l){
l=w.location;
// Setting the source of an image will load the URL even without adding to dom
// Using //www, still seems to work for https even though ssl.google is used by google
i.src='//www.google-analytics.com/__utm.gif'
// Version
+'?utmwv=5.4.2'
// ID
+'&utmac=UA-16505296-2'
// Sessions
// &utms=2
// Cache breaker (using utmcc to do this)
+'&utmn='+1
+'&utmhn='+e(l.hostname)
// Encoding
// &utmcs=UTF-8
+'&utmsr='+w.screen.availWidth+'x'+w.screen.availHeight
// Browser window
// &utmvp=1057x1105
// Color depth
// &utmsc=24-bit
+'&utmul='+(n.language||n.userLanguage)
// Java
// &utmje=1
// Flash version
// &utmfl=11.7%20r700
// Page title
// &utmdt=HTML5%20Video%20Player%20%7C%20Video.js
// Adsense
// &utmhid=1112291628
// Referrer, '-' is none
// Using current page as referrer so stats show up cleaner than "Direct"
+'&utmr='+e(l.href)
+'&utmp='+e(l.hostname+l.pathname)
// Current time stamp
// &utmht=1370890439353
// ?
// &utmu=q
// Cookies! Manually setting visitor ID and setting everything else to 1
// Random number used as cache buster instead of utmn
+'&utmcc=__utma%3D1.'+Math.floor(Math.random()*1e10)+'.1.1.1.1%3B'
// Custom Var: vjsv is the variable name and 1.0.0 is the VJS version
+'&utme=8(vjsv)9(v0.0.0)'
;
})(new Image(),window,navigator,encodeURIComponent);
+4 -1
Ver Arquivo
@@ -174,7 +174,10 @@ vjs.fixEvent = function(event) {
// which makes copying more difficult.
// TODO: Probably best to create a whitelist of event props
for (var key in old) {
event[key] = old[key];
// Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
if (key !== 'layerX' && key !== 'layerY') {
event[key] = old[key];
}
}
// The event occurred on this element
+10 -44
Ver Arquivo
@@ -392,7 +392,7 @@ vjs.Player.prototype.onError = function(e) {
vjs.log('Video Error', e);
};
vjs.Player.prototype.onFullscreenChange = function(e) {
vjs.Player.prototype.onFullscreenChange = function() {
if (this.isFullScreen) {
this.addClass('vjs-fullscreen');
} else {
@@ -593,7 +593,11 @@ vjs.Player.prototype.requestFullScreen = function(){
// take the controls fullscreen as well as the video
// Trigger fullscreenchange event after change
vjs.on(document, requestFullScreen.eventName, vjs.bind(this, function(){
// We have to specifically add this each time, and remove
// when cancelling fullscreen. Otherwise if there's multiple
// players on a page, they would all be reacting to the same fullscreen
// events
vjs.on(document, requestFullScreen.eventName, vjs.bind(this, function(e){
this.isFullScreen = document[requestFullScreen.isFullScreen];
// If cancelling fullscreen, remove event listener.
@@ -601,37 +605,18 @@ vjs.Player.prototype.requestFullScreen = function(){
vjs.off(document, requestFullScreen.eventName, arguments.callee);
}
this.trigger('fullscreenchange');
}));
// Flash and other plugins get reloaded when you take their parent to fullscreen.
// To fix that we'll remove the tech, and reload it after the resize has finished.
if (this.tech.features.fullscreenResize === false && this.options_['flash']['iFrameMode'] !== true) {
this.pause();
this.unloadTech();
vjs.on(document, requestFullScreen.eventName, vjs.bind(this, function(){
vjs.off(document, requestFullScreen.eventName, arguments.callee);
this.loadTech(this.techName, { src: this.cache_.src });
}));
this.el_[requestFullScreen.requestFn]();
} else {
this.el_[requestFullScreen.requestFn]();
}
this.trigger('fullscreenchange');
this.el_[requestFullScreen.requestFn]();
} else if (this.tech.supportsFullScreen()) {
// we can't take the video.js controls fullscreen but we can go fullscreen
// with native controls
this.techCall('enterFullScreen');
} else {
// fullscreen isn't supported so we'll just stretch the video element to
// fill the viewport
this.enterFullWindow();
this.trigger('fullscreenchange');
}
@@ -641,31 +626,11 @@ vjs.Player.prototype.requestFullScreen = function(){
vjs.Player.prototype.cancelFullScreen = function(){
var requestFullScreen = vjs.support.requestFullScreen;
this.isFullScreen = false;
// Check for browser element fullscreen support
if (requestFullScreen) {
// Flash and other plugins get reloaded when you take their parent to fullscreen.
// To fix that we'll remove the tech, and reload it after the resize has finished.
if (this.tech.features.fullscreenResize === false && this.options_['flash']['iFrameMode'] !== true) {
this.pause();
this.unloadTech();
vjs.on(document, requestFullScreen.eventName, vjs.bind(this, function(){
vjs.off(document, requestFullScreen.eventName, arguments.callee);
this.loadTech(this.techName, { src: this.cache_.src });
}));
document[requestFullScreen.cancelFn]();
} else {
document[requestFullScreen.cancelFn]();
}
this.trigger('fullscreenchange');
document[requestFullScreen.cancelFn]();
} else if (this.tech.supportsFullScreen()) {
this.techCall('exitFullScreen');
} else {
@@ -920,6 +885,7 @@ vjs.Player.prototype.ended = function(){ return this.techGet('ended'); };
// Current W3C Spec
// http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
// Mozilla Draft: https://wiki.mozilla.org/Gecko:FullScreenAPI#fullscreenchange_event
// New: https://dvcs.w3.org/hg/fullscreen/raw-file/529a67b8d9f3/Overview.html
if (div.cancelFullscreen !== undefined) {
requestFS.requestFn = 'requestFullscreen';
requestFS.cancelFn = 'exitFullscreen';
+4
Ver Arquivo
@@ -33,6 +33,10 @@ vjs.MediaFaker.prototype.createEl = function(){
vjs.MediaFaker.prototype.currentTime = function(){ return 0; };
vjs.MediaFaker.prototype.volume = function(){ return 0; };
vjs.MediaFaker.prototype.muted = function(){ return false; };
vjs.MediaFaker.prototype.pause = function(){ return false; };
vjs.MediaFaker.prototype.supportsFullScreen = function(){ return false; };
vjs.MediaFaker.prototype.features = {};
vjs.MediaFaker.prototype.buffered = function(){ return {}; };
// Export vars for Closure Compiler
vjs['MediaFaker'] = vjs.MediaFaker;
+18
Ver Arquivo
@@ -250,3 +250,21 @@ test('should set controls and trigger event', function() {
player.dispose();
});
// Can't figure out how to test fullscreen events with tests
// Browsers aren't triggering the events at least
// asyncTest('should trigger the fullscreenchange event', function() {
// expect(3);
// var player = PlayerTest.makePlayer();
// player.on('fullscreenchange', function(){
// ok(true, 'fullscreenchange event fired');
// ok(this.isFullScreen === true, 'isFullScreen is true');
// ok(this.el().className.indexOf('vjs-fullscreen') !== -1, 'vjs-fullscreen class added');
// player.dispose();
// start();
// });
// player.requestFullScreen();
// });