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

18 Commits

Author SHA1 Message Date
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
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
Gary Katsevman
b4ebd9ba00 test: fix tests on older IE (#3800) 2016-12-02 14:17:36 -05:00
Zoltán Tamási
41bd855e19 feat: Refactoring chapters button handling and fixing several issues (#3472)
* Refactored ChaptersButton, broke logic into several methods.
* Fixed the issues in #3447 about in some browsers tracks have an empty cues array instead of null. * Now we always subscribe to load event, and force an update. Also, track changes are handled, so chapters track can now be changed at runtime.
* Fixed the issue in #3447 about chapters menu items are not selectable. Now automatic update of the selected item based on player time works fine.
* Implemented the usage of the chapters track's label attribute as menu title, if it's present. If not, we fall back to the localized "Chapters" title.
* Refined the menu styling, so that vjs-menu-title telement won't get the hover effect, It would confuse users, because they might believe that the title item is a clickable item too.
2016-11-23 13:54:48 -05:00
Brandon Casey
86068a5b45 @BrandonOCasey updates tests to pass linter 2016-08-05 11:37:12 -04:00
Pat O'Neill
51f1863adc @misteroneill added a modal dialog. closes #2668 2015-10-28 13:28:15 -04: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
heff
6e5fc8d687 More build and testing cleanup. Also some reorganization. 2015-04-02 11:33:51 -07:00
heff
f298d18023 Most of test conversion for es6ification 2015-04-02 11:33:50 -07:00
Matthew McClure
2e689f85e5 Starting ES6 conversion up to functional player 2015-04-02 11:33:50 -07:00
Steve Heffernan
af02d158da @heff updated the poster to use CSS styles to display; fixed the poster not showing if not originally set. closes #1568 2014-10-16 12:59:41 -07:00
Matthew McClure
e72d682028 added timeout fix and tests. 2014-09-02 12:39:08 -07:00
Steve Heffernan
527a33a252 Maded some revisions to videojs/video.js#1369
closes #1369
2014-08-04 15:53:28 -07:00
Steve Heffernan
b3bbb17dd4 Restore the original video tag attributes on a tech change
set attributes of video tag and not only values

add unsupported attribute to the video tag - test failing

helper to set attributes on an element from a map of values

dummy compare of html content with a sort of the attributes

ignore html attributes order for comparition

save original tag attributes

restore original tag attributes n creation and overwrite if required by settings

replace object.keys with vjs.obj.each for ie<9

fix spacing

API consistency, getAttributeValues renamed to getElementAttributes

clear variable naming

move setElementAttributes close to getElementAttributes
2014-08-04 15:47:56 -07:00
Steve Heffernan
ef0d63b5ba Modified tests for #838 and updated changelog. closes #838 2013-11-26 16:53:23 -08:00
Steve Heffernan
1ddef27903 Close GH-588: Export bufferedPercent. 2013-06-24 12:47:47 -07:00