language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | src/js/video.js | @@ -63,29 +63,30 @@ function videojs(id, options, ready) {
// Allow for element or ID to be passed in
// String ID
if (typeof id === 'string') {
+ const players = videojs.getPlayers();
// Adjust for jQuery ID syntax
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
// If a play... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/api/api.js | @@ -124,12 +124,9 @@ QUnit.test('should be able to access expected MediaTech API methods', function(a
const mediaProto = media.prototype;
const html5 = videojs.getComponent('Html5');
const html5Proto = html5.prototype;
- const flash = videojs.getComponent('Flash');
- const flashProto = flash.prototype;
... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/component.test.js | @@ -2,6 +2,7 @@
import window from 'global/window';
import Component from '../../src/js/component.js';
import * as Dom from '../../src/js/utils/dom.js';
+import * as DomData from '../../src/js/utils/dom-data';
import * as Events from '../../src/js/utils/events.js';
import * as browser from '../../src/js/utils/brow... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/player.test.js | @@ -87,7 +87,7 @@ QUnit.test('should accept options from multiple sources and override in correct
});
QUnit.test('should get tag, source, and track settings', function(assert) {
- // Partially tested in lib->getElAttributes
+ // Partially tested in lib->getAttributes
const fixture = document.getElementById('... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/tech/flash-rtmp.test.js | @@ -1,58 +0,0 @@
-/* eslint-env qunit */
-import Flash from '../../../src/js/tech/flash.js';
-
-QUnit.module('Flash RTMP');
-
-const streamToPartsAndBack = function(url) {
- const parts = Flash.streamToParts(url);
-
- return Flash.streamFromParts(parts.connection, parts.stream);
-};
-
-QUnit.test('test using both str... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/tech/flash.test.js | @@ -1,263 +0,0 @@
-/* eslint-env qunit */
-import Flash from '../../../src/js/tech/flash.js';
-import { createTimeRange } from '../../../src/js/utils/time-ranges.js';
-import document from 'global/document';
-import sinon from 'sinon';
-
-// fake out the <object> interaction but leave all the other logic intact
-class ... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/tech/tech.test.js | @@ -1,7 +1,6 @@
/* eslint-env qunit */
import Tech from '../../../src/js/tech/tech.js';
import Html5 from '../../../src/js/tech/html5.js';
-import Flash from '../../../src/js/tech/flash.js';
import Button from '../../../src/js/button.js';
import { createTimeRange } from '../../../src/js/utils/time-ranges.js';
imp... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/test-helpers.js | @@ -108,7 +108,7 @@ const TestHelpers = {
const msg = `el should have the "${c}" class in its ` +
`className, which is "${el.className}"`;
- assert.ok(Dom.hasElClass(el, c), msg);
+ assert.ok(Dom.hasClass(el, c), msg);
});
props.forEach(p => { | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/utils/dom-data.test.js | @@ -0,0 +1,23 @@
+/* eslint-env qunit */
+import document from 'global/document';
+import * as DomData from '../../../src/js/utils/dom-data';
+
+QUnit.module('dom-data');
+
+QUnit.test('should get and remove data from an element', function(assert) {
+ const el = document.createElement('div');
+ const data = DomData.g... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/utils/dom.test.js | @@ -6,21 +6,6 @@ import * as Dom from '../../../src/js/utils/dom.js';
QUnit.module('dom');
-QUnit.test('should return the element with the ID', function(assert) {
- const el1 = document.createElement('div');
- const el2 = document.createElement('div');
- const fixture = document.getElementById('qunit-fixture');... | true |
Other | videojs | video.js | b387437aedc83e362740a42f92b1245ee91b8ec2.json | feat: remove flash tech (#3956)
Remove Flash Tech from core. Use videojs-flash if flash is needed.
Also, update DOM method names.
BREAKING CHANGE: remove flash tech from core. | test/unit/video.test.js | @@ -182,33 +182,49 @@ QUnit.test('should expose options and players properties for backward-compatibil
});
QUnit.test('should expose DOM functions', function(assert) {
+ const origWarnLog = log.warn;
+ const warnLogs = [];
- // Keys are videojs methods, values are Dom methods.
- const methods = {
- isEl: '... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/control-bar/audio-track-controls/audio-track-button.js | @@ -22,7 +22,7 @@ class AudioTrackButton extends TrackButton {
* The key/value store of player options.
*/
constructor(player, options = {}) {
- options.tracks = player.audioTracks && player.audioTracks();
+ options.tracks = player.audioTracks();
super(player, options);
@@ -49,11 +49,7 ... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/control-bar/audio-track-controls/audio-track-menu-item.js | @@ -33,14 +33,12 @@ class AudioTrackMenuItem extends MenuItem {
this.track = track;
- if (tracks) {
- const changeHandler = Fn.bind(this, this.handleTracksChange);
+ const changeHandler = Fn.bind(this, this.handleTracksChange);
- tracks.addEventListener('change', changeHandler);
- this.o... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/control-bar/text-track-controls/descriptions-button.js | @@ -29,15 +29,12 @@ class DescriptionsButton extends TextTrackButton {
this.el_.setAttribute('aria-label', 'Descriptions Menu');
const tracks = player.textTracks();
+ const changeHandler = Fn.bind(this, this.handleTracksChange);
- if (tracks) {
- const changeHandler = Fn.bind(this, this.handleT... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/control-bar/text-track-controls/text-track-button.js | @@ -43,10 +43,6 @@ class TextTrackButton extends TrackButton {
const tracks = this.player_.textTracks();
- if (!tracks) {
- return items;
- }
-
for (let i = 0; i < tracks.length; i++) {
const track = tracks[i];
| true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/control-bar/text-track-controls/text-track-menu-item.js | @@ -34,23 +34,20 @@ class TextTrackMenuItem extends MenuItem {
super(player, options);
this.track = track;
+ const changeHandler = Fn.bind(this, this.handleTracksChange);
- if (tracks) {
- const changeHandler = Fn.bind(this, this.handleTracksChange);
-
- tracks.addEventListener('change', c... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/player.js | @@ -25,8 +25,7 @@ import mergeOptions from './utils/merge-options.js';
import textTrackConverter from './tracks/text-track-list-converter.js';
import ModalDialog from './modal-dialog';
import Tech from './tech/tech.js';
-import AudioTrackList from './tracks/audio-track-list.js';
-import VideoTrackList from './tracks... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tech/html5.js | @@ -4,7 +4,6 @@
import Tech from './tech.js';
import * as Dom from '../utils/dom.js';
import * as Url from '../utils/url.js';
-import * as Fn from '../utils/fn.js';
import log from '../utils/log.js';
import tsml from 'tsml';
import * as browser from '../utils/browser.js';
@@ -13,6 +12,7 @@ import window from 'glo... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tech/tech.js | @@ -3,13 +3,7 @@
*/
import Component from '../component';
-import HTMLTrackElement from '../tracks/html-track-element';
-import HTMLTrackElementList from '../tracks/html-track-element-list';
import mergeOptions from '../utils/merge-options.js';
-import TextTrack from '../tracks/text-track';
-import TextTrackList ... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/audio-track-list.js | @@ -81,15 +81,14 @@ class AudioTrackList extends TrackList {
* @param {AudioTrack} track
* The AudioTrack to add to the list
*
- * @fires Track#addtrack
- * @private
+ * @fires TrackList#addtrack
*/
- addTrack_(track) {
+ addTrack(track) {
if (track.enabled) {
disableOthers(th... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/text-track-display.js | @@ -114,28 +114,26 @@ class TextTrackDisplay extends Component {
let firstDesc;
let firstCaptions;
- if (trackList) {
- for (let i = 0; i < trackList.length; i++) {
- const track = trackList[i];
-
- if (track.default) {
- if (track.kind === 'descriptions' && !fir... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/text-track-list.js | @@ -50,10 +50,9 @@ class TextTrackList extends TrackList {
* The text track to add to the list.
*
* @fires TrackList#addtrack
- * @private
*/
- addTrack_(track) {
- super.addTrack_(track);
+ addTrack(track) {
+ super.addTrack(track);
/**
* @listens TextTrack#modechange | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/text-track.js | @@ -331,11 +331,9 @@ class TextTrack extends Track {
addCue(cue) {
const tracks = this.tech_.textTracks();
- if (tracks) {
- for (let i = 0; i < tracks.length; i++) {
- if (tracks[i] !== this) {
- tracks[i].removeCue(cue);
- }
+ for (let i = 0; i < tracks.length; i++) {
+ ... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/track-list.js | @@ -50,7 +50,7 @@ class TrackList extends EventTarget {
});
for (let i = 0; i < tracks.length; i++) {
- list.addTrack_(tracks[i]);
+ list.addTrack(tracks[i]);
}
// must return the object, as for ie8 it will not be this
@@ -65,9 +65,8 @@ class TrackList extends EventTarget {
* ... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/track-types.js | @@ -0,0 +1,68 @@
+import AudioTrackList from './audio-track-list';
+import VideoTrackList from './video-track-list';
+import TextTrackList from './text-track-list';
+import HTMLTrackElementList from './html-track-element-list';
+
+import TextTrack from './text-track';
+import AudioTrack from './audio-track';
+import Vi... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | src/js/tracks/video-track-list.js | @@ -97,14 +97,13 @@ class VideoTrackList extends TrackList {
* The VideoTrack to add to the list
*
* @fires TrackList#addtrack
- * @private
*/
- addTrack_(track) {
+ addTrack(track) {
if (track.selected) {
disableOthers(this, track);
}
- super.addTrack_(track);
+ supe... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tech/tech.test.js | @@ -139,11 +139,11 @@ QUnit.test('dispose() should clear all tracks that are added after creation', fu
tech.addRemoteTextTrack({}, true);
tech.addRemoteTextTrack({}, true);
- tech.audioTracks().addTrack_(new AudioTrack());
- tech.audioTracks().addTrack_(new AudioTrack());
+ tech.audioTracks().addTrack(new Au... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/audio-track-list.test.js | @@ -40,7 +40,7 @@ QUnit.test('only one track is ever enabled', function(assert) {
assert.equal(track.enabled, true, 'track is enabled');
assert.equal(track2.enabled, false, 'track2 is disabled');
- list.addTrack_(track3);
+ list.addTrack(track3);
assert.equal(track.enabled, false, 'track is disabled');
... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/html-track-element.test.js | @@ -1,8 +1,11 @@
/* eslint-env qunit */
import HTMLTrackElement from '../../../src/js/tracks/html-track-element.js';
+import TextTrackList from '../../../src/js/tracks/text-track-list.js';
const defaultTech = {
- textTracks() {},
+ textTracks() {
+ return new TextTrackList();
+ },
on() {},
off() {},
... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/text-track-list-converter.test.js | @@ -56,8 +56,8 @@ if (Html5.supportsNativeTextTracks()) {
const tt = new TextTrackList();
- tt.addTrack_(nativeTrack.track);
- tt.addTrack_(emulatedTrack);
+ tt.addTrack(nativeTrack.track);
+ tt.addTrack(emulatedTrack);
const tech = {
$$() {
@@ -107,8 +107,8 @@ if (Html5.supportsNativ... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/text-track.test.js | @@ -7,10 +7,13 @@ import TextTrack from '../../../src/js/tracks/text-track.js';
import TestHelpers from '../test-helpers.js';
import proxyquireify from 'proxyquireify';
import sinon from 'sinon';
+import TextTrackList from '../../../src/js/tracks/text-track-list.js';
const proxyquire = proxyquireify(require);
co... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/text-tracks.test.js | @@ -370,7 +370,7 @@ QUnit.test('removes cuechange event when text track is hidden for emulated track
startTime: 2,
endTime: 5
});
- player.tech_.textTracks().addTrack_(tt);
+ player.tech_.textTracks().addTrack(tt);
let numTextTrackChanges = 0;
| true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/track-list.test.js | @@ -33,20 +33,20 @@ QUnit.test('can get tracks by int and string id', function(assert) {
QUnit.test('length is updated when new tracks are added or removed', function(assert) {
const trackList = new TrackList(this.tracks);
- trackList.addTrack_(newTrack('100'));
+ trackList.addTrack(newTrack('100'));
assert.... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/track.test.js | @@ -2,9 +2,12 @@
import TechFaker from '../tech/tech-faker';
import TrackBaseline from './track-baseline';
import Track from '../../../src/js/tracks/track.js';
+import TextTrackList from '../../../src/js/tracks/text-track-list.js';
const defaultTech = {
- textTracks() {},
+ textTracks() {
+ return new TextTr... | true |
Other | videojs | video.js | 49bed0703922073cf8a50421f7ae8a72428d173f.json | refactor: unify all Track and TrackList APIs (#3783)
Unify all track-related usage internally.
BREAKING CHANGE: some externally accessibly functions for tracks are now private. | test/unit/tracks/video-track-list.test.js | @@ -40,7 +40,7 @@ QUnit.test('only one track is ever selected', function(assert) {
assert.equal(track.selected, true, 'track is selected');
assert.equal(track2.selected, false, 'track2 is unselected');
- list.addTrack_(track3);
+ list.addTrack(track3);
assert.equal(track.selected, false, 'track is unselect... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/clickable-component.js | @@ -108,9 +108,8 @@ class ClickableComponent extends Component {
* @param {Element} [el=this.el()]
* Element to set the title on.
*
- * @return {string|ClickableComponent}
+ * @return {string}
* - The control text when getting
- * - Returns itself when setting; method can be... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/component.js | @@ -573,9 +573,6 @@ class Component {
* The event handler if `first` is a `Component` and `second` is an event name
* or an Array of event names.
*
- * @return {Component}
- * Returns itself; method can be chained.
- *
* @listens Component#dispose
*/
on(first, second, ... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/menu/menu-button.js | @@ -245,9 +245,6 @@ class MenuButton extends ClickableComponent {
/**
* Disable the `MenuButton`. Don't allow it to be clicked.
- *
- * @return {MenuButton}
- * Returns itself; method can be chained.
*/
disable() {
// Unpress, but don't force focus on this button
@@ -257,19 +254,15 @@... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/modal-dialog.js | @@ -153,20 +153,17 @@ class ModalDialog extends Component {
*
* @fires ModalDialog#beforemodalopen
* @fires ModalDialog#modalopen
- *
- * @return {ModalDialog}
- * Returns itself; method can be chained.
*/
open() {
if (!this.opened_) {
const player = this.player();
... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/player.js | @@ -568,7 +568,7 @@ class Player extends Component {
* The value to set the `Player's width to.
*
* @return {number}
- * The current width of the `Player`.
+ * The current width of the `Player` when getting.
*/
width(value) {
return this.dimension('width', value);
@@ -... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/slider/slider.js | @@ -281,10 +281,9 @@ class Slider extends Component {
* - true if slider is vertical,
* - false is horizontal
*
- * @return {boolean|Slider}
+ * @return {boolean}
* - true if slider is vertical, and getting
- * - false is horizontal, and getting
- * - a refe... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | src/js/tech/tech.js | @@ -1118,9 +1118,6 @@ Tech.withSourceHandlers = function(_Tech) {
*
* @param {Tech~SourceObject} source
* A source object with src and type keys
- *
- * @return {Tech}
- * Returns itself; this method is chainable
*/
_Tech.prototype.setSource = function(source) {
let sh = _Te... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | test/unit/component.test.js | @@ -595,13 +595,13 @@ QUnit.test('dimension() should treat NaN and null as zero', function(assert) {
newWidth = comp.dimension('width', null);
assert.notEqual(newWidth, width, 'new width and old width are not the same');
- assert.equal(newWidth, comp, 'we set a value, so, return value is component');
+ assert... | true |
Other | videojs | video.js | 8f07f5d57c52f68bf19d4dbbdde5725aafca3c31.json | refactor: Remove method Chaining from videojs (#3860)
Remove method chaining from videojs. This helps keep the methods consistent especially since play() now returns a Promise in some cases. Also, it can add some performance benefits.
BREAKING CHANGE: player methods no longer return a player instance when called. F... | test/unit/modal-dialog.test.js | @@ -87,15 +87,6 @@ QUnit.test('should create a close button by default', function(assert) {
assert.strictEqual(btn.el().parentNode, this.el, 'close button is a child of el');
});
-QUnit.test('returns `this` for expected methods', function(assert) {
- const methods = ['close', 'empty', 'fill', 'fillWith', 'open']... | true |
Other | videojs | video.js | 0bba3196d8a4ec280fa37824fd9b341eb717caa3.json | chore: Remove component.json and remove references to it (#3866)
Remove component.json and references to it in grunt.js because component is no longer maintained.
BREAKING CHANGE: removal of component.json | build/grunt.js | @@ -263,25 +263,25 @@ module.exports = function(grunt) {
options: {
release: 'major'
},
- src: ['package.json', 'component.json']
+ src: ['package.json']
},
minor: {
options: {
release: 'minor'
},
- src: ['package.json', 'compo... | true |
Other | videojs | video.js | 0bba3196d8a4ec280fa37824fd9b341eb717caa3.json | chore: Remove component.json and remove references to it (#3866)
Remove component.json and references to it in grunt.js because component is no longer maintained.
BREAKING CHANGE: removal of component.json | component.json | @@ -1,22 +0,0 @@
-{
- "name": "video.js",
- "description": "An HTML5 and Flash video player with a common API and skin for both.",
- "version": "5.16.0",
- "keywords": [
- "videojs",
- "html5",
- "flash",
- "video",
- "player"
- ],
- "scripts": ["dist/video-js/video.dev.js"],
- "styles": ["dist/vi... | true |
Other | videojs | video.js | 091bdf9261549e49d453f4591cde9c6d555bfa00.json | feat: Return the native Promise from play() (#3907)
Return the native Promise from `play()` if it exists. `undefined` is returned otherwise.
This comes in as part of the greater effort to remove method chaining.
BREAKING CHANGE: `play()` no longer returns the player object but instead the native Promise or nothing... | src/js/player.js | @@ -1564,20 +1564,26 @@ class Player extends Component {
/**
* start media playback
*
- * @return {Player}
- * A reference to the player object this function was called on
+ * @return {Promise|undefined}
+ * Returns a `Promise` if the browser returns one, for most browsers this will
+... | true |
Other | videojs | video.js | 091bdf9261549e49d453f4591cde9c6d555bfa00.json | feat: Return the native Promise from play() (#3907)
Return the native Promise from `play()` if it exists. `undefined` is returned otherwise.
This comes in as part of the greater effort to remove method chaining.
BREAKING CHANGE: `play()` no longer returns the player object but instead the native Promise or nothing... | src/js/tech/html5.js | @@ -455,19 +455,6 @@ class Html5 extends Tech {
this.removeOldTracks_(techTracks, elTracks);
}
- /**
- * Called by {@link Player#play} to play using the `Html5` `Tech`.
- */
- play() {
- const playPromise = this.el_.play();
-
- // Catch/silence error when a pause interrupts a play request
- // ... | true |
Other | videojs | video.js | 091bdf9261549e49d453f4591cde9c6d555bfa00.json | feat: Return the native Promise from play() (#3907)
Return the native Promise from `play()` if it exists. `undefined` is returned otherwise.
This comes in as part of the greater effort to remove method chaining.
BREAKING CHANGE: `play()` no longer returns the player object but instead the native Promise or nothing... | test/unit/player.test.js | @@ -1066,6 +1066,34 @@ QUnit.test('should be scrubbing while seeking', function(assert) {
player.dispose();
});
+if (window.Promise) {
+ QUnit.test('play promise should resolve to native promise if returned', function(assert) {
+ const player = TestHelpers.makePlayer({});
+ const done = assert.async();
+
+... | true |
Other | videojs | video.js | 29ffbfbc87410414d76193f838ad061045b6ee53.json | feat: Restore all outlines for greater accessibility (#3829)
Restore all outlines on components that are focusable to increase accessibility of these components.
BREAKING CHANGE: restoring the outlines changes the skin slightly and potentially break users. Fixes #3200. | src/css/_utilities.scss | @@ -24,7 +24,6 @@
border: 0;
clip: rect(0 0 0 0);
height: 1px;
- margin: -1px;
overflow: hidden;
padding: 0;
position: absolute; | true |
Other | videojs | video.js | 29ffbfbc87410414d76193f838ad061045b6ee53.json | feat: Restore all outlines for greater accessibility (#3829)
Restore all outlines on components that are focusable to increase accessibility of these components.
BREAKING CHANGE: restoring the outlines changes the skin slightly and potentially break users. Fixes #3200. | src/css/components/_big-play.scss | @@ -36,7 +36,6 @@
.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
- outline: 0;
border-color: $primary-foreground-color;
@include background-color-with-alpha($secondary-background-color, $secondary-background-transparency); | true |
Other | videojs | video.js | 29ffbfbc87410414d76193f838ad061045b6ee53.json | feat: Restore all outlines for greater accessibility (#3829)
Restore all outlines on components that are focusable to increase accessibility of these components.
BREAKING CHANGE: restoring the outlines changes the skin slightly and potentially break users. Fixes #3200. | src/css/components/_control.scss | @@ -2,7 +2,6 @@
// It's used on both real buttons (play button)
// and div buttons (menu buttons)
.video-js .vjs-control {
- outline: none;
position: relative;
text-align: center;
margin: 0; | true |
Other | videojs | video.js | 29ffbfbc87410414d76193f838ad061045b6ee53.json | feat: Restore all outlines for greater accessibility (#3829)
Restore all outlines on components that are focusable to increase accessibility of these components.
BREAKING CHANGE: restoring the outlines changes the skin slightly and potentially break users. Fixes #3200. | src/css/components/_slider.scss | @@ -1,5 +1,4 @@
.video-js .vjs-slider {
- outline: 0;
position: relative;
cursor: pointer;
padding: 0; | true |
Other | videojs | video.js | 29ffbfbc87410414d76193f838ad061045b6ee53.json | feat: Restore all outlines for greater accessibility (#3829)
Restore all outlines on components that are focusable to increase accessibility of these components.
BREAKING CHANGE: restoring the outlines changes the skin slightly and potentially break users. Fixes #3200. | src/css/components/menu/_menu.scss | @@ -37,7 +37,6 @@
.vjs-menu li.vjs-menu-item:focus,
.vjs-menu li.vjs-menu-item:hover {
- outline: 0;
@include background-color-with-alpha($secondary-background-color, $secondary-background-transparency);
}
| true |
Other | videojs | video.js | 8622b2648e6ad75b9d968e2f2027c6baab27d03f.json | refactor: expose tech but warn without safety var (#3916)
`Player#tech` can now be called without passing an object into it. It no longer requires passing an object into it, so, current code will not break.
If nothing is passed in, a warning will be logged about knowing what you're doing. If anything is passed in, th... | src/js/player.js | @@ -6,6 +6,7 @@ import Component from './component.js';
import document from 'global/document';
import window from 'global/window';
+import tsml from 'tsml';
import * as Events from './utils/events.js';
import * as Dom from './utils/dom.js';
import * as Fn from './utils/fn.js';
@@ -920,32 +921,25 @@ class Player... | true |
Other | videojs | video.js | 8622b2648e6ad75b9d968e2f2027c6baab27d03f.json | refactor: expose tech but warn without safety var (#3916)
`Player#tech` can now be called without passing an object into it. It no longer requires passing an object into it, so, current code will not break.
If nothing is passed in, a warning will be logged about knowing what you're doing. If anything is passed in, th... | test/unit/player.test.js | @@ -1209,29 +1209,38 @@ QUnit.test('you can clear error in the error event', function(assert) {
});
QUnit.test('Player#tech will return tech given the appropriate input', function(assert) {
+ const oldLogWarn = log.warn;
+ let warning;
+
+ log.warn = function(_warning) {
+ warning = _warning;
+ };
+
const... | true |
Other | videojs | video.js | 73b6316f3bdb8cb7582af85d0c17bcde365fd930.json | refactor: remove special loadstart handling (#3906)
This is both a change as well as a bug fix. We tried to have better awareness of when the underlying video element changed underneath us so we can dispose of the source handler but that broke some use cases of MSE. Given that we weren't able to fix it in a reasonable... | src/js/tech/tech.js | @@ -1141,12 +1141,6 @@ Tech.withSourceHandlers = function(_Tech) {
if (sh !== _Tech.nativeSourceHandler) {
this.currentSource_ = source;
-
- // Catch if someone replaced the src without calling setSource.
- // If they do, set currentSource_ to null and dispose our source handler.
- this.off... | true |
Other | videojs | video.js | 73b6316f3bdb8cb7582af85d0c17bcde365fd930.json | refactor: remove special loadstart handling (#3906)
This is both a change as well as a bug fix. We tried to have better awareness of when the underlying video element changed underneath us so we can dispose of the source handler but that broke some use cases of MSE. Given that we weren't able to fix it in a reasonable... | test/unit/tech/tech.test.js | @@ -506,50 +506,6 @@ QUnit.test('Tech.isTech returns correct answers for techs and components', funct
assert.ok(!isTech(isTech), 'A function is not a Tech');
});
-QUnit.test('Tech#setSource clears currentSource_ after repeated loadstart', function(assert) {
- let disposed = false;
- const MyTech = extendFn(Tech... | true |
Other | videojs | video.js | 20141202c1f81dec33f498c97ef9664e4a7c1cd2.json | refactor: Remove custom UMD (#3826)
Only use `module.exports` for better compatibility between bundlers and module systems. | src/js/video.js | @@ -2,9 +2,6 @@
* @file video.js
* @module videojs
*/
-
-/* global define */
-
import window from 'global/window';
import document from 'global/document';
import * as setup from './setup';
@@ -629,19 +626,6 @@ videojs.insertContent = Dom.insertContent;
*/
videojs.computedStyle = computedStyle;
-/*
- * Cus... | false |
Other | videojs | video.js | f35de1c98de972ae71af13f8aae266fcd7c66e78.json | chore: fix typo in collaborator guide (#3931) | COLLABORATOR_GUIDE.md | @@ -22,7 +22,7 @@
## Issues and Pull Requests
-Full courtesey should always be shown in video.js projects.
+Full courtesy should always be shown in video.js projects.
Collaborators may manage issues they feel qualified to handle, being mindful of our guidelines.
| false |
Other | videojs | video.js | d120ea29b70926eb99e55d052b85a9d6af9f7223.json | chore(release): add es5 folder to the tagged commit (#3913) | contrib.json | @@ -287,7 +287,7 @@
[ "git push upstream master", "Push the dev branch changes to the repo" ],
[ "git checkout temp-release-branch", "Checkout the temp branch again" ],
[ "grunt dist", "Build the dist" ],
- [ "git add dist --forc... | false |
Other | videojs | video.js | b5472145bf1b43ee25de78e8257c0a517678e86f.json | feat: Show big play button on pause if specified (#3892) | src/css/components/_big-play.scss | @@ -50,3 +50,8 @@
.vjs-error .vjs-big-play-button {
display: none;
}
+
+// Show big play button if video is paused and .vjs-show-big-play-button-on-pause is set on video element
+.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button {
+ display: block;
+} | false |
Other | videojs | video.js | e5a240a63118a2f9dfe487b6ae493e6ae4bc650a.json | docs(faq): add a question about autoplay (#3898) | docs/faq.md | @@ -15,6 +15,8 @@
* [If you don't think you can fix the issue or add the feature](#if-you-dont-think-you-can-fix-the-issue-or-add-the-feature)
* [Q: What is a reduced test case?](#q-what-is-a-reduced-test-case)
* [Q: What media formats does video.js support?](#q-what-media-formats-does-videojs-support)
+* [Q: How ... | false |
Other | videojs | video.js | 9c741165789772d5dfd17eb8e989c38cda765a8a.json | docs(faq): add FAQ question about RTMP url (#3899) | docs/faq.md | @@ -15,6 +15,7 @@
* [If you don't think you can fix the issue or add the feature](#if-you-dont-think-you-can-fix-the-issue-or-add-the-feature)
* [Q: What is a reduced test case?](#q-what-is-a-reduced-test-case)
* [Q: What media formats does video.js support?](#q-what-media-formats-does-videojs-support)
+* [Q: How ... | false |
Other | videojs | video.js | 22cf3dd935de58eb93205dd9a5d285bf24970976.json | feat: deprecate the use of `starttime` in player.js (#3838) | src/js/player.js | @@ -1250,12 +1250,14 @@ class Player extends Component {
*
* @fires Player#firstplay
* @listens Tech#firstplay
+ * @deprecated As of 6.0 passing the `starttime` option to the player will be deprecated
* @private
*/
handleTechFirstPlay_() {
// If the first starttime attribute is specified
... | false |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | docs/guides/components.md | @@ -7,6 +7,13 @@ The architecture of the Video.js player is centered around components. The `Play
* [What is a Component?](#what-is-a-component)
* [Creating a Component](#creating-a-component)
* [Component Children](#component-children)
+ * [Basic Example](#basic-example)
+ * [Using Options](#using-options)
+* [Ev... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | docs/guides/event-target.md | @@ -0,0 +1,118 @@
+# Event Target
+
+## Table of Contents
+
+* [Overview](#overview)
+* [on() and addEventListener()](#on-and-addeventlistener)
+* [off() and removeEventListener](#off-and-removeeventlistener)
+* [one()](#one)
+* [trigger() and dispatchEvent](#trigger-and-dispatchevent)
+
+## Overview
+
+Events in video... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | docs/guides/player-workflows.md | @@ -4,16 +4,29 @@ This document outlines many considerations for using Video.js for advanced playe
## Table of Contents
+* [Accessing a player that has already been created on a page](#accessing-a-player-that-has-already-been-created-on-a-page)
* [Removing Players](#removing-players)
* [dispose()](#dispose)
... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | docs/guides/plugins.md | @@ -11,11 +11,11 @@ If you've built something cool with Video.js, you can easily share it with the r
You may have already done this step. Code up something interesting and then wrap it in a function. At the most basic level, that's all a video.js plugin is. By convention, plugins take a hash of options as their first ... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | docs/guides/videojs.md | @@ -0,0 +1,179 @@
+# Usage examples for the functions on videojs
+
+## Table of Contents
+
+* [videojs()](#videojs)
+* [options](#options)
+* [getComponent()](#getcomponent)
+* [registerComponent](#registercomponent)
+* [getTech()](#gettech)
+* [registerTech](#registertech)
+* [extend()](#extend)
+* [mergeOptions()](#m... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/button.js | @@ -92,9 +92,6 @@ class Button extends ClickableComponent {
/**
* Enable the `Button` element so that it can be activated or clicked. Use this with
* {@link Button#disable}.
- *
- * @return {Component}
- * Returns itself; method is chainable.
*/
enable() {
super.enable();
@@ -104,9 ... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/component.js | @@ -18,33 +18,6 @@ import mergeOptions from './utils/merge-options.js';
* in the DOM. They can be children of other components, and can have
* children themselves.
*
- * Creating a button component.
- * ``` js
- * // adding a button to the player
- * var player = videojs('some-video-id');
- * var Component ... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/control-bar/progress-control/seek-bar.js | @@ -104,8 +104,8 @@ class SeekBar extends Slider {
/**
* Get percentage of video played
*
-
- * @return {Number} Percentage played
+ * @return {number}
+ * The percentage played
*/
getPercent() {
const percent = this.player_.currentTime() / this.player_.duration(); | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/control-bar/volume-menu-button.js | @@ -101,6 +101,9 @@ class VolumeMenuButton extends PopupButton {
/**
* Create the VolumeMenuButton popup
+ *
+ * @return {Popup}
+ * The popup that was created
*/
createPopup() {
const popup = new Popup(this.player_, { | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/event-target.js | @@ -48,20 +48,6 @@ EventTarget.prototype.allowedEvents_ = {};
* Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a
* function that will get called when an event with a certain name gets triggered.
*
- * ```js
- * var foo = new EventTarget();
- * var handleBar = function() {
... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/extend.js | @@ -1,12 +1,23 @@
import log from './utils/log';
import {isObject} from './utils/obj';
-/*
+/**
* @file extend.js
- *
+ * @module extend
+ */
+
+/**
* A combination of node inherits and babel's inherits (after transpile).
* Both work the same but node adds `super_` to the subClass
* and Bable adds the super... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/player.js | @@ -57,7 +57,7 @@ const TECH_EVENTS_RETRIGGER = [
* Retrigger the `progress` event that was triggered by the {@link Tech}.
*
* @private
- * @method Player.prototype.handleTechProgress_
+ * @method Player#handleTechProgress_
* @fires Player#progress
* @listens Tech#progress
*/
@@ -73,7 +73,7 ... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/plugins.js | @@ -4,9 +4,6 @@
*/
import Player from './player.js';
-/**
- *
- */
/**
* The method for registering a video.js plugin. {@link videojs:videojs.registerPlugin].
* | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/poster-image.js | @@ -89,7 +89,7 @@ class PosterImage extends ClickableComponent {
/**
* Set the source of the `PosterImage` depending on the display method.
*
- * @param {String} url
+ * @param {string} url
* The URL to the source for the `PosterImage`.
*/
setSrc(url) { | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/setup.js | @@ -1,8 +1,7 @@
/**
- * Functions for setting up a player without user insteraction based on the data-setup
- * `attribute` of the video tag.
+ * @file setup.js - Functions for setting up a player without
+ * user interaction based on the data-setup `attribute` of the video tag.
*
- * @file setup.js
* @module setu... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tech/flash-rtmp.js | @@ -104,8 +104,7 @@ function FlashRtmpDecorator(Flash) {
/**
* Regular expression used to check if the source is an rtmp source.
*
- * @property
- * @type {RegExp}
+ * @property {RegExp} Flash.RTMP_RE
*/
Flash.RTMP_RE = /^rtmp[set]?:\/\//i;
| true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tech/flash.js | @@ -377,15 +377,15 @@ for (let i = 0; i < _readOnly.length; i++) {
/**
* Get the value of `rtmpConnection` from the swf.
*
- * @method Flash.prototype.rtmpConnection
+ * @method Flash#rtmpConnection
* @return {string}
* The current value of `rtmpConnection` on the swf.
*/
/**
* Get the value of ... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tech/html5.js | @@ -1128,7 +1128,7 @@ Html5.resetMediaElement = function(el) {
* Get the value of `paused` from the media element. `paused` indicates whether the media element
* is currently paused or not.
*
- * @method Html5.prototype.paused
+ * @method Html5#paused
* @return {boolean}
* The value of `... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tech/tech.js | @@ -21,14 +21,8 @@ import document from 'global/document';
/**
* An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string
* that just contains the src url alone.
- *
- * ``` js
- * var SourceObject = {
- * src: 'http://example.com/some-video.mp4',
- * type: 'video/mp4'
- * };
-... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tracks/text-track-list-converter.js | @@ -1,8 +1,7 @@
/**
- * Utilities for capturing text track state and re-creating tracks
- * based on a capture.
+ * @file text-track-list-converter.js Utilities for capturing text track state and
+ * re-creating tracks based on a capture.
*
- * @file text-track-list-converter.js
* @module text-track-list-converter... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/tracks/track-list.js | @@ -173,7 +173,7 @@ class TrackList extends EventTarget {
/**
* Events that can be called with on + eventName. See {@link EventHandler}.
*
- * @property
+ * @property {Object} TrackList#allowedEvents_
* @private
*/
TrackList.prototype.allowedEvents_ = { | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/utils/events.js | @@ -1,11 +1,10 @@
/**
- * @file events.js
- * @module events
- *
- * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
+ * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
* (Original book version wasn't completely usable, so fixed some things and made Clo... | true |
Other | videojs | video.js | 642ad4b5cf3636431b840740d0d62a033ac1e5c1.json | docs: move examples out of code into docs | src/js/video.js | @@ -47,10 +47,7 @@ if (typeof HTMLVideoElement === 'undefined' &&
* Doubles as the main function for users to create a player instance and also
* the main library object.
* The `videojs` function can be used to initialize or retrieve a player.
- * ```js
- * var myPlayer = videojs('my_video_id');
- * ```
- *
+ ... | true |
Other | videojs | video.js | 74530d8b3afe71a28ffc36a2623bd938a9d419ad.json | feat(player): ingest a player div for videojs (#3856)
If the videojs embed code (a video element) is wrapped in a div with the
'data-vjs-player' attribute on it, that element will be used for the
player div and a new one will not be created. In addition, on browsers
like iOS that don't support moving the media elem... | src/js/player.js | @@ -490,8 +490,15 @@ class Player extends Component {
* The DOM element that gets created.
*/
createEl() {
- const el = this.el_ = super.createEl('div');
const tag = this.tag;
+ let el;
+ const playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute('data-v... | true |
Other | videojs | video.js | 74530d8b3afe71a28ffc36a2623bd938a9d419ad.json | feat(player): ingest a player div for videojs (#3856)
If the videojs embed code (a video element) is wrapped in a div with the
'data-vjs-player' attribute on it, that element will be used for the
player div and a new one will not be created. In addition, on browsers
like iOS that don't support moving the media elem... | src/js/tech/html5.js | @@ -185,15 +185,21 @@ class Html5 extends Tech {
// Check if this browser supports moving the element into the box.
// On the iPhone video will break if you move the element,
// So we have to create a brand new element.
- if (!el || this.movingMediaElementInDOM === false) {
+ // If we ingested the ... | true |
Other | videojs | video.js | 74530d8b3afe71a28ffc36a2623bd938a9d419ad.json | feat(player): ingest a player div for videojs (#3856)
If the videojs embed code (a video element) is wrapped in a div with the
'data-vjs-player' attribute on it, that element will be used for the
player div and a new one will not be created. In addition, on browsers
like iOS that don't support moving the media elem... | test/unit/player.test.js | @@ -830,6 +830,93 @@ QUnit.test('should restore attributes from the original video tag when creating
assert.equal(el.getAttribute('webkit-playsinline'), '', 'webkit-playsinline attribute was set properly');
});
+QUnit.test('if tag exists and movingMediaElementInDOM, re-use the tag', function(assert) {
+ // simul... | true |
Other | videojs | video.js | 74530d8b3afe71a28ffc36a2623bd938a9d419ad.json | feat(player): ingest a player div for videojs (#3856)
If the videojs embed code (a video element) is wrapped in a div with the
'data-vjs-player' attribute on it, that element will be used for the
player div and a new one will not be created. In addition, on browsers
like iOS that don't support moving the media elem... | test/unit/video.test.js | @@ -40,6 +40,9 @@ QUnit.test('should return a video player instance', function(assert) {
const player2 = videojs(tag2, { techOrder: ['techFaker'] });
assert.ok(player2.id() === 'test_vid_id2', 'created player from element');
+
+ player.dispose();
+ player2.dispose();
});
QUnit.test('should return a video ... | true |
Other | videojs | video.js | 83cbeec424fc3537524621284a57b4b6c7a157b4.json | fix: remove vjs-seeking on src change (#3846)
If you're in a seeking state and the source changed, we should no longer
be in a seeking state.
Fixes #3765. | src/js/player.js | @@ -1077,6 +1077,7 @@ class Player extends Component {
// TODO: Update to use `emptied` event instead. See #1277.
this.removeClass('vjs-ended');
+ this.removeClass('vjs-seeking');
// reset the error state
this.error(null); | false |
Other | videojs | video.js | 5ec46b0372147dcecf907b5e6b523b95d93871f7.json | test: add Edge to browserstack tests (#3834)
remove edge version so we're always on latest | build/grunt.js | @@ -223,6 +223,7 @@ module.exports = function(grunt) {
chrome_bs: { browsers: ['chrome_bs'] },
firefox_bs: { browsers: ['firefox_bs'] },
safari_bs: { browsers: ['safari_bs'] },
+ edge_bs: { browsers: ['edge_bs'] },
ie11_bs: { browsers: ['ie11_bs'] },
ie10_bs: ... | true |
Other | videojs | video.js | 5ec46b0372147dcecf907b5e6b523b95d93871f7.json | test: add Edge to browserstack tests (#3834)
remove edge version so we're always on latest | test/karma.conf.js | @@ -104,6 +104,7 @@ module.exports = function(config) {
'chrome_bs',
'firefox_bs',
'safari_bs',
+ 'edge_bs',
'ie11_bs',
'ie10_bs',
'ie9_bs',
@@ -140,6 +141,13 @@ function getCustomLaunchers(){
os_version: 'Yosemite'
},
+ edge_bs: {
+ bas... | true |
Other | videojs | video.js | 54ff1f97b8588d0baf6131df2b18e4194fd3e272.json | docs: add a troubleshooting guide (#3814) | docs/guides/troubleshooting.md | @@ -0,0 +1,80 @@
+ Troubleshooting
+
+## Problems with media formats
+
+### Choosing a video format
+#### I want to have a single source and don't care about live/adaptive streaming:
+Most browsers now play MP4 with h264 video. If you want to have a single source, and neither live streaming
+nor adaptive streaming is a... | false |
Other | videojs | video.js | 1d5562d656153c7a89d32accc9da30bbcc23d6db.json | docs(FAQ): add an faq (#3805) | docs/guides/faq.md | @@ -0,0 +1,179 @@
+# FAQ
+
+## Q: What is video.js?
+video.js is an extendable framework/library around the native video element. It does the following:
+ * Offers a plugin API so that different types of video can be handed to the native
+ video element (e.g. HLS, Flash, HTML5 video, etc).
+ * Unifies the native v... | false |
Other | videojs | video.js | b4ebd9ba008edf5e1708460398771d0f5c8c84bd.json | test: fix tests on older IE (#3800) | src/js/component.js | @@ -1443,7 +1443,13 @@ class Component {
if (name === 'Player' && Component.components_[name]) {
const Player = Component.components_[name];
- if (Player.players && Object.keys(Player.players).length > 0) {
+ // If we have players that were disposed, then their name will still be
+ // in Pl... | true |
Other | videojs | video.js | b4ebd9ba008edf5e1708460398771d0f5c8c84bd.json | test: fix tests on older IE (#3800) | test/unit/player.test.js | @@ -144,6 +144,8 @@ QUnit.test('should get current source from source tag', function(assert) {
assert.ok(player.currentSource().src === 'http://google.com');
assert.ok(player.currentSource().type === 'video/mp4');
+
+ player.dispose();
});
QUnit.test('should get current sources from source tag', function(a... | true |
Other | videojs | video.js | b4ebd9ba008edf5e1708460398771d0f5c8c84bd.json | test: fix tests on older IE (#3800) | test/unit/test-helpers.js | @@ -139,22 +139,22 @@ const TestHelpers = {
* @param {string} eventType
*/
triggerDomEvent(element, eventType) {
- let event;
-
- if (document.createEvent) {
- event = document.createEvent('HTMLEvents');
- event.initEvent(eventType, true, true);
- } else {
- event = document.cr... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.