From c8646aa02be11eedbd3fa78e3357a6196b8aedb3 Mon Sep 17 00:00:00 2001 From: jforbes Date: Tue, 2 Feb 2016 14:29:31 -0500 Subject: [PATCH 01/77] @forbesjo updated emulated tracks to have listeners removed when they are removed. closes #3046 --- CHANGELOG.md | 2 +- src/js/tracks/text-track-list.js | 3 +++ test/unit/tracks/text-track-list.test.js | 19 +++++++++++-------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7092a227a6..a32c1ac217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ CHANGELOG ========= ## HEAD (Unreleased) -_(none)_ +* @forbesjo updated emulated tracks to have listeners removed when they are removed ([view](https://github.com/videojs/video.js/pull/3046)) -------------------- diff --git a/src/js/tracks/text-track-list.js b/src/js/tracks/text-track-list.js index 6022213643..d44f3fb4a4 100644 --- a/src/js/tracks/text-track-list.js +++ b/src/js/tracks/text-track-list.js @@ -111,6 +111,9 @@ TextTrackList.prototype.removeTrack_ = function(rtrack) { for (let i = 0, l = this.length; i < l; i++) { if (this[i] === rtrack) { track = this[i]; + if (track.off) { + track.off(); + } this.tracks_.splice(i, 1); diff --git a/test/unit/tracks/text-track-list.test.js b/test/unit/tracks/text-track-list.test.js index 8306d3daee..c389df86fd 100644 --- a/test/unit/tracks/text-track-list.test.js +++ b/test/unit/tracks/text-track-list.test.js @@ -6,13 +6,16 @@ var noop = Function.prototype; var genericTracks = [ { id: '1', - addEventListener: noop + addEventListener: noop, + off: noop }, { id: '2', - addEventListener: noop + addEventListener: noop, + off: noop }, { id: '3', - addEventListener: noop + addEventListener: noop, + off: noop } ]; @@ -36,9 +39,9 @@ test('can get text tracks by id', function() { test('length is updated when new tracks are added or removed', function() { var ttl = new TextTrackList(genericTracks); - ttl.addTrack_({id: '100', addEventListener: noop}); + ttl.addTrack_({id: '100', addEventListener: noop, off: noop}); equal(ttl.length, genericTracks.length + 1, 'the length is ' + (genericTracks.length + 1)); - ttl.addTrack_({id: '101', addEventListener: noop}); + ttl.addTrack_({id: '101', addEventListener: noop, off: noop}); equal(ttl.length, genericTracks.length + 2, 'the length is ' + (genericTracks.length + 2)); ttl.removeTrack_(ttl.getTrackById('101')); @@ -71,8 +74,8 @@ test('can access new items by index', function() { test('cannot access removed items by index', function() { var ttl = new TextTrackList(genericTracks); - ttl.addTrack_({id: '100', addEventListener: noop}); - ttl.addTrack_({id: '101', addEventListener: noop}); + ttl.addTrack_({id: '100', addEventListener: noop, off: noop}); + ttl.addTrack_({id: '101', addEventListener: noop, off: noop}); equal(ttl[3].id, '100', 'id of item at index 3 is 100'); equal(ttl[4].id, '101', 'id of item at index 4 is 101'); @@ -86,7 +89,7 @@ test('cannot access removed items by index', function() { test('new item available at old index', function() { var ttl = new TextTrackList(genericTracks); - ttl.addTrack_({id: '100', addEventListener: noop}); + ttl.addTrack_({id: '100', addEventListener: noop, off: noop}); equal(ttl[3].id, '100', 'id of item at index 3 is 100'); ttl.removeTrack_(ttl.getTrackById('100')); From 2f0b9ee8ca790520dc7bdbd1473ee175fa1425b6 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Tue, 2 Feb 2016 14:32:19 -0500 Subject: [PATCH 02/77] @incompl improved the UX of time tooltips. closes #3060 --- CHANGELOG.md | 1 + src/css/components/_progress.scss | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32c1ac217..ad4bcede49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG ## HEAD (Unreleased) * @forbesjo updated emulated tracks to have listeners removed when they are removed ([view](https://github.com/videojs/video.js/pull/3046)) +* @incompl improved the UX of time tooltips ([view](https://github.com/videojs/video.js/pull/3060)) -------------------- diff --git a/src/css/components/_progress.scss b/src/css/components/_progress.scss index 7ff1c6be51..6e35cdf0fe 100644 --- a/src/css/components/_progress.scss +++ b/src/css/components/_progress.scss @@ -86,12 +86,12 @@ .video-js .vjs-play-progress:after { display: none; position: absolute; - top: -2.4em; + top: -3.4em; right: -1.5em; font-size: 0.9em; color: #000; content: attr(data-current-time); - padding: 0.2em 0.5em; + padding: 6px 8px 8px 8px; @include background-color-with-alpha(#fff, 0.8); @include border-radius(0.3em); } From 99b34e96919b1aeaf2b2b3408bb59c7bba2fd46f Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 2 Feb 2016 14:40:43 -0500 Subject: [PATCH 03/77] @gkatsev updated README to include links to plugins page and getting started and cleaner link to LICENSE. closes #3066 --- CHANGELOG.md | 1 + README.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4bcede49..049fc067f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG ## HEAD (Unreleased) * @forbesjo updated emulated tracks to have listeners removed when they are removed ([view](https://github.com/videojs/video.js/pull/3046)) * @incompl improved the UX of time tooltips ([view](https://github.com/videojs/video.js/pull/3060)) +* @gkatsev updated README to include links to plugins page and getting started and cleaner link to LICENSE ([view](https://github.com/videojs/video.js/pull/3066)) -------------------- diff --git a/README.md b/README.md index c87859f325..0c22f249e4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ > Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over ~~50,000~~ ~~100,000~~ 200,000 websites. ## Quick start -Thanks to the awesome folks over at [Fastly](http://www.fastly.com/), there's a free, CDN hosted version of Video.js that anyone can use. Simply add these includes to your document's +Thanks to the awesome folks over at [Fastly](http://www.fastly.com/), there's a free, CDN hosted version of Video.js that anyone can use. +Also, check out the [Getting Started](http://videojs.com/getting-started/) page on our website which has the latest urls as well. +Simply add these includes to your document's ``: ```html @@ -14,7 +16,7 @@ Thanks to the awesome folks over at [Fastly](http://www.fastly.com/), there's a ``` Then, whenever you want to use Video.js you can simply use the `