1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00
Commit Graph

31 Commits

Author SHA1 Message Date
Gary Katsevman
6bff3ce779
fix(vjsstandard): update to 8.0.2 and fixup linting (#5413) 2018-09-28 14:58:15 -04:00
Gary Katsevman
954f3d979f
fix(player): video-js embed missing video-js class (#5194)
When having a video-js embed with a class attribute, as part of the
changes to remove old IE support (#5041), we overwrote our addition of
the video-js class when it was missing. Instead, we want to make sure
that we don't override the class names again since they are already set
up correctly.

Fixes videojs/http-streaming#100
2018-05-22 21:44:35 -04:00
Gary Katsevman
bc2da7c67b
refactor: remove IE8 specific changes (#5041)
BREAKING CHANGE: remove IE8, IE9, and IE10 specific JavaScript and CSS code. Remove Android 2.3 workaround.
2018-03-23 13:25:12 -04:00
Gary Katsevman
0ace2a5449
fix: regression for getting a player via the tech's id (#4969)
As part of https://github.com/videojs/video.js/pull/4836, this piece of code was removed because it was thought it was not needed as everything else covers it. Turns out it's needed.

f6eaa5e2ae/src/js/video.js (L103-L107)
2018-02-22 14:22:12 -05:00
Pat O'Neill
6a0057716b feat: Add videojs.getAllPlayers to get an array of players. (#4842) 2018-01-30 11:43:47 -05:00
Pat O'Neill
a15e616a45 feat: Add getPlayer method to Video.js. (#4836) 2018-01-30 11:19:06 -05:00
Brandon Casey
bbea5cc7cb fix: only print element not in DOM warning on player creation (#4755) 2017-11-16 18:12:37 -05:00
Gary Katsevman
2da7af1137
perf: null out els on dispose to minimize detached els (#4745)
A we retained a lot of references to DOM elements in various components. Here we clear it up. Also, make sure that we remove unused listeners as they can retain objects as well.
Update evented mixin to null out the eventBusEl_ after the component is disposed.
Add a feature for components, to tell it not to auto-initialize the evented mixin.
Re-enable the tests that were removed in #4640.
2017-11-16 11:19:47 -05:00
Gary Katsevman
d8aadd5bee
feat: allow embeds via <video-js> element (#4640)
Add the ability to initialize Video.js with an element named video-js. This is because sometimes, seeing the native element is undesirable, plus, it's cool to have our own element.
Can be used just like the video embed.
IE9 is supported but only with dynamic sources as the source element can only be used inside of the video element.
2017-11-13 14:20:05 -05:00
Ilya Piatrenka
c213737f7a test: warning, if the element is not in the DOM (#4723)
Add test to #4698
2017-11-07 15:44:16 -05:00
Gary Katsevman
34aab3f357 feat: middleware (#3788)
Add middleware support. Middleware can function as go-between between the player and the tech. For example, it can modify the duration that the tech returns to the player. In addition, middleware allow for supporting custom video sources and types.

Currently, middleware can only intercept timeline methods like duration, currentTime, and setCurrentTime.

For example,
```js
videojs.use('video/foo', {
  setSource(src, next) {
    next(null, {
      src: 'http://example.com/video.mp4',
      type: 'video/mp4'
    });
  }
});
```
Will allow you to set a source with type `video/foo` which will play back `video.mp4`.

This makes setting the source asynchronous, which aligns it with the spec a bit more. Methods like play can still be called synchronously on the player after setting the source and the player will play once the source has loaded.

`sourceOrder` option was removed as well and it will now always use source ordering.

BREAKING CHANGE: setting the source is now asynchronous. `sourceOrder` option removed and made the default.
2017-01-19 17:29:09 -05:00
Brandon Casey
b387437aed 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.
2017-01-19 16:01:56 -05:00
Pat O'Neill
8d1653aebc feat: Advanced Class-based Plugins for 6.0 (#3690) 2017-01-18 01:52:23 -05:00
Garrett
b7c384eb5b fix: extra warn logs on already initialized player references (#3888) 2016-12-23 11:29:23 -05:00
Gary Katsevman
74530d8b3a 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 element inside the DOM, we
will not need to clone the element and we could continue to re-use the
same video element give to us in the embed code.

This could also be extended in the future to change our embed code to a
div-only approach if we so choose.
2016-12-19 11:51:42 -05:00
Gary Katsevman
87cd26d958 test(hooks): move vjs hooks QUnit module into separate file (#3862) 2016-12-15 14:57:34 -05:00
Brandon Casey
e9e5b5f782 test(hooks): fix hooks unit test in ie8 (#3745) 2016-11-04 16:43:27 -04:00
Brandon Casey
77357b1cd2 feat: implement player lifecycle hooks and trigger beforesetup/setup hooks (#3639)
Allows you to hook into `beforesetup` and `setup` hooks for all players that are created by videojs.
2016-11-04 14:25:32 -04:00
Richard L. Chung
af6beb21c3 @rlchung fixed tests that weren't disposing players when they finished. closes 3524 2016-08-25 10:58:42 -04:00
Pat O&#x27;Neill
72c44daaf3 @misteroneill updated tests to qunit 2.0. closes #3509 2016-08-12 13:51:31 -04:00
Brandon Casey
86068a5b45 @BrandonOCasey updates tests to pass linter 2016-08-05 11:37:12 -04:00
Gary Katsevman
6977b0e3fe @gkasev updated vjs to correctly return already created player when given an element. closes #3006 2016-01-15 15:27:35 -05:00
Pat O&#x27;Neill
8ad286a768 @misteroneill exposed createEl on videojs. closes #2926 2016-01-07 23:03:23 -05:00
Pat O&#x27;Neill
f2fa8f8687 @misteroneill exposed DOM helpers. closes #2754 2015-11-09 17:43:17 -05:00
Benoit Tremblay
2de28927d7 @eXon added support for a tech-supplied poster. closes #2339 2015-09-28 11:23:25 -07:00
heff
4d97dd4d29 Fixed a number of errors in the log after testing
- Fixed a console error in dom tests from loading a track source
- Switched to non-fetching poster urls in tests to prevent errors
- Stubbed XHR for TextTrack tests to prevent log errors
- Fixed text track console errors that stubbing async didn't catch
    because there's some async happening in tracks that makes it so
- XHR isn't even used until the test is complete
- Removed extra code
- Added player.dispose more places and fixed attributes test
2015-08-31 16:36:11 -07:00
David LaPalomento
fecf3a0f8a @dmlap switched global options back to an object at videojs.options. closes #2461 2015-08-12 13:51:43 -07:00
David LaPalomento
a76b42d50c @misteroneill restore some properties on window.videojs. Closes #2395 2015-07-30 12:10:04 -04:00
45aff0062cf1b0e55a6532b0a513db6be3952d17
6b2dca32fc Normalise lang codes to lowercase for insensitive match
Use primary code ('en') if specific code ('en-us') doesn not match
Always re-merge languages

closes #2177

Updated language function to lowercase internally

Updated component.localize to not require stubbing
2015-05-21 17:07:13 -07:00
heff
1bfe0b4fed Clean up and documentation of src/js/video.js and DOM functions
Preparing to export utility functions on the videojs object

closes #2182

Change el() to getEl() for consistency

Cleaned up DOM functions library

Clean up and document videojs object API

Fixed mergeOptions to modify the first object instead of a copy

More cleanup of the main video.js file and documentation

Fixed issues with mergeOptions

Cleaned up the addLanguage function

Removed unnecessary underscores in private module vars
2015-05-21 11:33:12 -07:00
heff
a8ff970d4a Broke up Lib and Util into smaller libraries of functions
Broke out bind, guid, and element data functions from Lib

Separated out more dom functions in to dom.js

Broke out URL functions into url.js

Removed setLocalStorage since it wasn't being used

Moved browser tests out of lib

Moved log functions into their own file

Removed trim() since it wasn't being used

Moved formatTime into its own file

Moved round into its own file and renamed roundFloat()

Moved capitalize into its own file and renamed as toTitleCase()

Moved createTimeRange into its own file

Removed Lib.arr.forEach infavor of the native forEach

Removed Lib.obj.create in favor of native Object.create (ES6-sham)

Removed obj.each in favor of native Object.getOwnPropertyNames().forEach()

Removed obj.merge and copy. Using lodash.assign instead.

Replaced Lib.obj.isPlain with lodash.isPlainObject

Removed Lib.obj.isArray in favor of the native Array.isArray

Also removed the lib.js tests file as all tests have been moved
or removed.

Removed Lib.isEmpty in favor of !Object.getOwnPropertyNames().length

Switched Util.mergeOptions and deepMerge to use new mergeOptions()

Moved Lib.TEST_VID to Html5.TEST_VID

Removed Lib references everywhere. Woo!

Attempting to fix sourcemap test errors by setting grunt-browserify version

Switched to object.assign from lodash.assign

Removed unused 'inherits' dependency

Reorganzied test files and added '.test' to file names

Combined js/core.js and js/video.js

Moved events.js into the utils directory
2015-05-15 18:20:35 -07:00