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

444 Commits

Author SHA1 Message Date
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
a7ffa34b7b fix: remote text track deprecation warnings (#3864) 2016-12-15 15:48:19 -05:00
Gary Katsevman
3f724f9349 test(hooks): remove errors logged in tests (#3865) 2016-12-15 15:48:03 -05:00
Gary Katsevman
87cd26d958 test(hooks): move vjs hooks QUnit module into separate file (#3862) 2016-12-15 14:57:34 -05:00
Gary Katsevman
98b80df0d0 stub/restore window.console properly (#3861) 2016-12-15 14:55:23 -05:00
Gary Katsevman
214e01c885 test(events): silence error logging in tests (#3835)
The error that is logged in this test makes it hard to see what is an actual error in some cases.
2016-12-05 16:22:49 -05:00
Pat O'Neill
014c6b89e6 fix(throttle): Fix error in Fn.throttle that broke MouseTimeDisplay (#3833)
We were not initializing `last` properly in the throttle function.
2016-12-05 16:14:03 -05:00
Gary Katsevman
881cfcb346 feat(texttracks): always use emulated text tracks (#3798)
Chrome has a bug where if you add a remote text track and try to use it programmatically, you won't get any cues displayed. So, just switch to always emulated mode.

Also, add IS_SAFARI and IS_ANY_SAFARI to the browsers.
2016-12-02 16:13:33 -05:00
Pat O'Neill
8f16de2778 feat: Object Type-Detection and Replacing object.assign (#3757) 2016-12-02 15:44:57 -05:00
Gary Katsevman
b4ebd9ba00 test: fix tests on older IE (#3800) 2016-12-02 14:17:36 -05:00
forbesjo
9b9f89e5b3 feat(tracks): Added option to disable native tracks (#3786)
This adds nativeAudioTracks and nativeVideoTracks tech options, this will disable hooking into the native track APIs. This would be useful when using videojs-contrib-hls on Edge.
2016-11-23 14:09:32 -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
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