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

432 Commits

Author SHA1 Message Date
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
Adam Misiorny
de25d751b9 feat: Allow to use custom Player class (#3458)
This allows a user to register a new Player component with videojs to be used when videojs is called. If a player has been created already when trying to register a Player component, an error is thrown.
Fixes #3335 and #3016.
2016-11-23 13:52:54 -05:00
Gary Katsevman
eb5e78bb88 revert: perf: Cache currentTime and buffered from Flash (#3705) (#3778)
This reverts commit 45ffa810fb.
2016-11-14 16:09:54 -05:00
Jon-Carlos Rivera
f05a9271b8 feat: option to have remoteTextTracks automatically 'garbage-collected' when sources change (#3736)
Tech#addRemoteTextTrack now accepts a second parameter - a boolean named manualCleanup which defaults to true preserving backwards compatibility. When that value is set to false the text track will be removed from the video element whenever a source change occurs.
2016-11-09 16:07:59 -05:00
Gary Katsevman
996507744f test(dom): fix removeElClass test in Safari 10. (#3768)
Safari 10 automatically dedupes duplicate class names in an element. So,
our test was failing because we had an extra "foo" in the check. This is
an unlikely scenario that has browser variations, so, better to just
remove it.
2016-11-09 16:06:38 -05:00
David LaPalomento
45ffa810fb perf: Cache currentTime and buffered from Flash (#3705)
Calling into the SWF too often is expensive. Current time and buffered don't actually change that often but it's very common to call them a couple times in the handling of a single event. Cache their return values for 100ms so the performance penalty of going through ExternalInterface is limited.
2016-11-04 18:03:44 -04: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
Pat O'Neill
fb74c71ba6 refactor(texttracksettings): DRYer code and remove massive HTML blob (#3679)
* DRYer code while keeping tests passing
* Replace massive HTML blob with DOM methods
* Create obj util and implement it
2016-11-04 13:45:51 -04:00
mister-ben
2e720afb65 fix: allow rounded value for fluid player ratio test (#3739) 2016-11-03 18:40:14 -04:00
Carey Hinoki
028559ccb0 feat: add ability to get current source object and all source objects (#2678)
Adds `currentSource` and `currentSources` methods to the player that return the current source object, containing `currentSrc()` and `currentType()`, and all source objects that were given to the player.

Fixes #2443
2016-11-03 15:50:55 -04:00
mister-ben
de1b363470 feat(clickable-component): Disable interaction with disabled clickable components (#3525)
enable() and disable() on clickable components is only cosmetic. "Disabled" implies the control should not be functional.

* Remove event listeners on disable() and add back on enable().
* Move adding listeners from constructor to enable
* Remove tabindex from disabled components and add disabled attribute to disabled buttons to prevent keyboard access.
2016-11-03 15:43:15 -04:00
Carey Hinoki
9d77268f76 feat: Components are now accessible via camelCase and UpperCamelCase (#3439)
This means that you can `getChild` and `addChild` with both `myComponent` and `MyComponent`.

Fixes #3436.
2016-11-03 15:40:35 -04:00
mister-ben
ed59531f78 fix: Suppress Infinity duration on Android Chrome before playback (#3476)
HTML5 tech will return NaN instead of Infinity if playback has not started. Fires a durationupdate event once the reported duration can be believed if the duration is still Infinity, so controls can update.

Fixes #3079.
2016-11-03 15:39:09 -04:00
mister-ben
2988f6ae53 feat(fluid): use default aspect ratio for fluid players if width unknown (#3614)
If a player is fluid and does not have a width set, and preload is set to none, the height of the player is zero. This includes where preload is forced to none by mobile Chrome as in #3606.

* If the player has the .vjs-fluid class when initialised, fluid is set to true, so adding the class behaves the same as {fluid: true} in the setup options.
* The fluid(bool) setter calls player.updateStyleEl_(). Otherwise it won't be triggered in createEl() if an aspect ratio is not also set.
* Corrects the test for a set videoWidth() in updateStyleEl_() - videoWidth() returns 0 if the width is unknown. This allows the default 16:9 to kick in rather than using 0:0.
2016-11-03 15:37:30 -04:00
Marco
dd2aff00a8 fix: disable HLS hack on Firefox for Android (#3586)
* Disable HLS hack on Firefox for Android

* Fix canPlayType patching tests

* Add test to ensure that canPlayType is not patched in Firefox for Android

* Fix assertion message in Firefox for Android test
2016-09-29 14:14:42 -04:00
Gary Katsevman
fac52046f3 Merge branch 'stable' 2016-08-25 19:34:07 -04:00
Jon-Carlos Rivera
fdd8550307 @imbcmdth Added exception handling to event dispatcher. closes #3580
* Guard against exceptions in an event handler to stop them from breaking further processing of event handlers

* Added a test for try/catch behavior for exceptions originating in event handlers
2016-08-25 19:08:56 -04:00
Gary Katsevman
f37383784d Merge branch 'stable' 2016-08-25 12:19:03 -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'Neill
1d2d08584e @misteroneill fixed IE8 media error test failure. closes #3568 2016-08-24 13:48:39 -04:00
Pat O'Neill
b56ed61523 @misteroneill fixed wrapping native and emulated MediaErrors. closes #3562 2016-08-24 11:00:21 -04:00
Gary Katsevman
955185379f @gkatsev updated build system to open es5 folder for bundles and dist folder other users. closes #3445 2016-08-17 17:16:41 -04:00
Gary Katsevman
773b5ab1c1 Merge branch 'stable' 2016-08-15 18:20:47 -04:00
mister-ben
fa1c6430f4 @mister-ben silenced chrome's play() request was interrupted by pause() error. closes #3518 2016-08-15 17:49:52 -04:00
Vineet
2c84f45ff3 @vdeshpande fixed control text for fullscreen button. closes #3485 2016-08-15 17:44:01 -04:00
Pat O'Neill
72c44daaf3 @misteroneill updated tests to qunit 2.0. closes #3509 2016-08-12 13:51:31 -04:00
Priti Agarwal
945711855a @pagarwal123 updated some test code to pass linter 2016-08-05 11:38:08 -04:00
Brandon Casey
86068a5b45 @BrandonOCasey updates tests to pass linter 2016-08-05 11:37:12 -04:00
Brandon Casey
c89b75699e first half of the test/unit/tracks directory (#3483) 2016-08-03 15:27:47 -04:00
Pat O'Neill
8dd01467f3 @misteroneill corrects test assertions for older IEs in the log module. closes #3454 2016-07-22 13:50:29 -04:00
Owen Edwards
238c752aee @OwenEdwards fixed caption settings dialog labels for accessibility. closes #3281 2016-07-19 00:19:36 -04:00
mister-ben
5883c9236e @mister-ben updated language to inherit correctly and respect the attribute on the player. closes #3426 2016-07-18 14:53:31 -04:00
Pat O'Neill
13d349b0da @misteroneill improved Logging for IE < 11. closes #3356 2016-07-18 14:32:31 -04:00
Vít Koumar
f36da276e3 @vit-koumar updated Flash tech to return Infinity from duration instead of -1. closes #3128 2016-07-18 14:10:57 -04:00
ldayananda
c51c180b3c @ldayananda updated videojs to not do anything if no src is set. closes #3378 2016-06-27 23:07:00 -04:00
Gary Katsevman
b9e3e55384 Merge branch 'stable' 2016-05-27 18:28:40 -04:00
brandonocasey
fa8fc80b83 @BrandonOCasey fixed source handlers being disposed multiple times when a video is put into the video element directly. closes #3343 2016-05-27 18:12:47 -04:00
Nicky Gerritsen
17f856849d @nickygerritsen Fix test for tooltips in IE8. closes #3327 2016-05-19 09:47:27 +02:00
Nicky Gerritsen
ed39b68f13 @nickygerritsen Add title to all clickable components. closes #3296 2016-05-17 10:17:12 +02:00
Gary Katsevman
b1e7bfd8f8 Merge branch 'stable' 2016-05-12 14:49:47 -04:00
Gary Katsevman
82d396a1fb @gkatsev nulled out currentSource_ in setSource. closes #3314 2016-05-12 14:43:10 -04:00
Pat O'Neill
ed3249818e @misteroneill Un-deprecate the videojs.players property. closes #3299 2016-05-11 09:10:15 +02:00
Nicky Gerritsen
68c4d248d9 @nickygerritsen Also pass tech options to canHandleSource. closes #3303 2016-05-11 09:08:17 +02:00
Greg Smith
249532ad45 @incompl clear currentSource_ after subsequent loadstarts. closes #3285 2016-05-02 18:54:34 -04:00
brandonocasey
2e2dbde4b4 @BrandonOCasey added audio and video track support. closes #3173 2016-04-22 14:31:12 -04:00
Gary Katsevman
cfb9621884 Merge branch 'stable' 2016-04-19 17:20:24 -04:00
Gary Katsevman
264e53fb5b @gkatsev fixed text track tests for older IEs. closes #3269 2016-04-19 17:09:53 -04:00
Gary Katsevman
d3b368ccce @gkatsev fixed removeRemoteTextTracks not working with return value from addRemoteTextTracks. closes #3253 2016-04-19 15:46:33 -04:00
Gary Katsevman
ff83aa6573 @gkatsev made the first emulated text track enabled by default. closes #3248 2016-04-19 15:18:21 -04:00
Nicky Gerritsen
f606f9df50 @nickygerritsen Pass tech options to source handlers. closes #3245 2016-04-13 20:28:09 +02:00
Chris Auclair
fa27cc7dbf @chrisauclair added ARIA region and label to player element. closes #3227 2016-04-05 13:47:58 -04:00
Gary Katsevman
b91018952e Merge branch 'stable' 2016-03-29 16:15:07 -04:00
Maythee Anegboonlap
31b2f9d489 @llun fixed menus from throwing when focused when empty. closes #3218 2016-03-29 16:09:10 -04:00
Gary Katsevman
4663d0ed01 use a brand new tag el for ie8 2016-03-28 12:08:00 -04:00
Can Küçükyılmaz
ac3771a329 @defli added currentWidth and currentHeight methods to the player. closes #3144. 2016-03-25 15:12:53 -04:00
Owen Edwards
41bc481597 @OwenEdwards added basic descriptions track support. closes #3098 2016-03-25 14:16:56 -04:00
Gary Katsevman
66a2c05510 @gkatsev updated vjs to not add dynamic styles when VIDEOJS_NO_DYNAMIC_STYLE is set. closes #3093 2016-03-25 14:06:39 -04:00
Gary Katsevman
dbdc411dc2 @gkatsev cleared vttjs script handlers on dispose. Fixed tests. closes #3189 2016-03-17 18:56:25 -04:00
Gary Katsevman
e2c8c125a2 @gkatsev changed emulated tracks to in novtt to wait for vttjs to load or error before parsing. closes #3181 2016-03-17 14:53:00 -04:00
brandonocasey
c1112b74fe @BrandonOCasey updated text track unit tests to use full es6 syntax. closes #3148 2016-03-07 14:54:32 -05:00
Gary Katsevman
f77bcc95d0 @gkatsev cleared waiting/spinner on timeupdate. Fixes #3124. closes #3138 2016-03-07 14:48:15 -05:00
Erik Yuzwa
fc7a166705 @erikyuzwa added ability to add child component at specific index. closes #2540 2016-02-04 13:42:49 -05:00
jforbes
c8646aa02b @forbesjo updated emulated tracks to have listeners removed when they are removed. closes #3046 2016-02-02 14:29:31 -05:00
Owen Edwards
16f0179c07 @OwenEdwards added ClickableComponent. Fixed keyboard operation of buttons. closes #3032 2016-01-25 18:30:12 -05: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
Gary Katsevman
dcf2a300ef make sure that styleEl_ is in DOM before removing on dispose. closes #3004 2016-01-14 14:01:30 -05:00
Pat O'Neill
8ad286a768 @misteroneill exposed createEl on videojs. closes #2926 2016-01-07 23:03:23 -05:00
Carey Hinoki
8f2bc92412 @chemoish emulated HTMLTrackElement to enable track load events. closes #2804 2015-12-08 11:24:51 -05:00
Gary Katsevman
e78e26b8a4 @gkatsev added a Player#reset method. Fixes #2852. closes #2880 2015-12-07 17:45:50 -05:00
Gary Katsevman
0b7a2e41b3 @gkatsev added Player#tech. Fixes #2617. closes #2883 2015-12-07 16:27:33 -05:00
jrivera
69b89e51f4 @imbcmdth added sourceOrder option for source-first ordering in selectSource. closes #2847 2015-11-25 17:11:36 -05:00
jforbes
8acd28c15a @forbesjo updated formatTime to not go negative. closes #2821 2015-11-25 16:46:41 -05:00
Garrett Singer
72f77d77c9 @gesinger fixed handler explosion for cuechange events. closes #2849 2015-11-25 16:13:23 -05:00
Garrett Singer
7171ea8d42 @gesinger checked for track changes before tech started listening. closes #2835 2015-11-25 16:00:49 -05:00
Gary Katsevman
5f9095079e @gkatsev fixed clearing out errors. closes #2850 2015-11-24 15:37:34 -05:00
Violeta Marculescu
c0d5f471bc @bcvio fixed returning current source rather than blob url. closes #2833 2015-11-23 12:04:31 -05:00
Nathaniel Bibler
3a40b10fa6 @nbibler ensured classes begin with alpha characters. Fixes #2828. closes #2829 2015-11-20 17:38:05 -05:00
Gary Katsevman
d1316a39ab @gkatsev updated MediaLoader to check for techs in their registry. closes #2798 2015-11-10 15:53:14 -05:00
Gary Katsevman
0da23c1d8d @gkatsev fixed usage of textTracksToJson. closes #2797 2015-11-10 15:30:09 -05:00
Pat O'Neill
f2fa8f8687 @misteroneill exposed DOM helpers. closes #2754 2015-11-09 17:43:17 -05:00
Brian Deitte
4e395b6b02 Add unit test for new rtmp path changes 2015-11-09 14:31:15 -05:00
Gary Katsevman
5d754c911d @gkatsev made initListeners more general and added Tech.isTech. Fixes #2767. closes #2773 2015-11-06 16:42:19 -05:00
Pat O'Neill
51f1863adc @misteroneill added a modal dialog. closes #2668 2015-10-28 13:28:15 -04:00
Gary Katsevman
ab88bcdde3 @gkatsev fixes track tests and ignored empty properties in tracks converter. closes #2744 2015-10-27 15:54:48 -04:00
Nicky Gerritsen
589cab7fa7 @nickygerritsen added canPlayType method to player. closes #2709 2015-10-27 13:46:05 -04:00
Gary Katsevman
93e079718e @gkatsev removed unhelpful isCrossOrigin test. closes #2715 2015-10-26 16:57:21 -04:00
heff
cd6c568a03 @imbcmdth fix potential triggerReady infinite loop 2015-09-29 09:28:02 -07:00
heff
e225fbffc2 Merge branch 'master' into stable
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.less
	dist/video-js/video-js.min.css
	dist/video-js/video-js.swf
	dist/video-js/video.dev.js
	dist/video-js/video.js
	dist/video-js/video.novtt.dev.js
	dist/video-js/video.novtt.js
	src/css/video-js.less
	src/js/control-bar/time-display.js
	src/js/exports.js
	src/js/lib.js
	src/js/media/flash.js
	src/js/media/flash.rtmp.js
	src/js/media/html5.js
	src/js/media/media.js
	src/js/player.externs.js
	test/unit/api.js
	test/unit/flash.js
	test/unit/media.html5.js
	test/unit/media.js
2015-09-29 09:14:50 -07:00
Benoit Tremblay
2de28927d7 @eXon added support for a tech-supplied poster. closes #2339 2015-09-28 11:23:25 -07:00
Gary Katsevman
0b7cf586c2 @gkatsev exposed isCrossOrigin and used it to enable CORS for textTrack XHRs. closes #2633 2015-09-24 19:58:25 -04:00
heff
81806d5725 @heff fixed timeranges deprecation warnings in tests. closes #2627 2015-09-23 12:34:59 -04:00
Pat O'Neill
61a00db7cb @misteroneill rename "extends" to "extend" for ie8. closes #2624 2015-09-22 11:19:04 -04:00
jrivera
24ad9841ac @imbcmdth extended createTimeRange to support multiple timeranges. closes #2604 2015-09-21 18:04:10 -04:00
heff
51bae4d7cf Fixed a double loadstart and added readyState catch up events
- Fixed some issue comments
 - Fixed a double ready event

closes #2605
fixes #2588
2015-09-18 10:28:16 -07:00
David LaPalomento
24cdbdefff Use Raynos/xhr for XMLHttpRequests
- Get rid of our custom XHR shim. Export it as videojs.xhr.
- Updated XHR to be stubbed everywhere in tests to prevent errors.
- Added npm install to the review process

closes #2318
closes #2594
2015-09-15 15:25:11 -07:00
heff
f7466af956 Made tech related functions clearly private in the player
This is important for enforcing the model that techs should
work the same for everything.

closes #2590
fixes #2060

- Made techGet and techCall private functions
- Made loadTech, techName, and unloadTech private
- Cleaned up all other private method naming in the player
- Removed some unneeded comments
2015-09-15 12:54:26 -07:00
heff
f10d8d0cb3 @heff added an attributes argument to createEl(). closes #2589
fixes #2176
2015-09-15 10:59:08 -07:00
heff
3fb786e271 @heff removed playerOptions from plugin options because it created an inconsistency in plugin inits. closes #2532 2015-09-02 15:47:10 -07:00
heff
f492450a01 Small fix to an IE9 broken test, introduced in #2513 2015-08-31 17:17:26 -07:00