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

2607 Commits

Author SHA1 Message Date
Brandon Casey
1d5562d656 docs(FAQ): add an faq (#3805) 2016-12-02 15:24:33 -05:00
Brandon Casey
c9022795fd docs(jsdoc): Update the jsdoc comments to modern syntax - Part 6 (#3771)
Files in this PR:
* src/js/control-bar/audio-track-controls/audio-track-button.js
* src/js/control-bar/audio-track-controls/audio-track-menu-item.js
* src/js/control-bar/control-bar.js
* src/js/control-bar/fullscreen-toggle.js
* src/js/control-bar/live-display.js
* src/js/control-bar/mute-toggle.js
* src/js/control-bar/play-toggle.js
* src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js
* src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js
* src/js/control-bar/progress-control/load-progress-bar.js
* src/js/control-bar/progress-control/mouse-time-display.js
* src/js/control-bar/progress-control/play-progress-bar.js
* src/js/control-bar/progress-control/progress-control.js
* src/js/control-bar/progress-control/seek-bar.js
* src/js/control-bar/progress-control/tooltip-progress-bar.js
* src/js/control-bar/spacer-controls/custom-control-spacer.js
* src/js/control-bar/spacer-controls/spacer.js
* src/js/control-bar/text-track-controls/caption-settings-menu-item.js
* src/js/control-bar/text-track-controls/captions-button.js
* src/js/control-bar/text-track-controls/chapters-button.js
* src/js/control-bar/text-track-controls/chapters-track-menu-item.js
* src/js/control-bar/text-track-controls/descriptions-button.js
* src/js/control-bar/text-track-controls/off-text-track-menu-item.js
* src/js/control-bar/text-track-controls/subtitles-button.js
* src/js/control-bar/text-track-controls/text-track-button.js
* src/js/control-bar/text-track-controls/text-track-menu-item.js
* src/js/control-bar/time-controls/current-time-display.js
* src/js/control-bar/time-controls/duration-display.js
* src/js/control-bar/time-controls/remaining-time-display.js
* src/js/control-bar/time-controls/time-divider.js
* src/js/control-bar/track-button.js
* src/js/control-bar/volume-control/volume-bar.js
* src/js/control-bar/volume-control/volume-control.js
* src/js/control-bar/volume-control/volume-level.js
* src/js/control-bar/volume-menu-button.js
* src/js/utils/dom.js
* src/js/utils/events.js
* src/js/utils/log.js
* src/js/utils/merge-options.js
* src/js/utils/url.js
* src/js/video.js
2016-12-02 15:20:41 -05:00
Brandon Casey
ba3cf1724f docs(jsdoc): Update the jsdoc comments to modern syntax - Part 5 (#3766)
Files in this PR:
* src/js/tracks/audio-track-list.js
* src/js/tracks/audio-track.js
* src/js/tracks/html-track-element-list.js
* src/js/tracks/html-track-element.js
* src/js/tracks/text-track-cue-list.js
* src/js/tracks/text-track-display.js
* src/js/tracks/text-track-list-converter.js
* src/js/tracks/text-track-list.js
* src/js/tracks/text-track-settings.js
* src/js/tracks/text-track.js
* src/js/tracks/track-enums.js
* src/js/tracks/track-list.js
* src/js/tracks/track.js
* src/js/tracks/video-track-list.js
* src/js/tracks/video-track.js
* src/js/utils/browser.js
* src/js/utils/buffer.js
* src/js/utils/computed-style.js
* src/js/utils/fn.js
* src/js/utils/format-time.js
* src/js/utils/guid.js
* src/js/utils/obj.js
* src/js/utils/stylesheet.js
* src/js/utils/time-ranges.js
* src/js/utils/to-title-case.js
2016-12-02 15:17:08 -05:00
Brandon Casey
15ce37e45d docs(jsdoc): Update the jsdoc comments to modern syntax - Part 4 (#3756)
Files in this PR:
* src/js/poster-image.js
* src/js/tech/flash-rtmp.js
* src/js/tech/flash.js
* src/js/tech/html5.js
* src/js/tech/loader.js
* src/js/tech/tech.js
2016-12-02 15:14:36 -05:00
Brandon Casey
eb2093e16e docs(jsdoc): Update the jsdoc comments to modern syntax - Part 3 (#3708)
files in this change:
* src/js/player.js
* src/js/setup.js
* src/js/slider/slider.js
2016-12-02 15:13:04 -05:00
Brandon Casey
cfc3ed7f0f docs(jsdoc): Update the jsdoc comments to modern syntax - Part 2 (#3698)
Files updates:
* src/js/fullscreen-api.js
* src/js/loading-spinner.js
* src/js/media-error.js
* src/js/menu/menu-button.js
* src/js/menu/menu-item.js
* src/js/menu/menu.js
* src/js/modal-dialog.js
* src/js/plugins.js
* src/js/popup/popup-button.js
* src/js/popup/popup.js
2016-12-02 15:12:01 -05:00
Brandon Casey
1a0b2812ce docs(jsdoc): Update the jsdoc comments to modern syntax - Part 1 (#3694)
Add jsdoc npm script.
Update JSDoc comments for the following files:
* src/js/big-play-button.js
* src/js/button.js
* src/js/clickable-component.js
* src/js/close-button.js
* src/js/component.js
* src/js/error-display.js
* src/js/event-target.js
2016-12-02 15:07:19 -05:00
Pat O'Neill
d24fe409e8 docs(guides): Manual Documentation Improvements (#3703) 2016-12-02 14:27:59 -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
Aaron Boushley
d69551ac80 refactor(html5): remove confusing references to player in a tech (#3790)
These references to player_ are actually not the player due to techs not having a reference to the player.
2016-11-23 13:58:11 -05:00
Chuong
c5d1152456 docs: fix typo, extends -> extend (#3789) 2016-11-23 13:56:03 -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
406c203f17 v5.13.2 2016-11-14 16:13:07 -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
ldayananda
430be94e7f fix(HtmlTrackElementList): allow to reference by index via bracket notation (#3776)
Previously, HtmlTrackElementList did not actually let you access HtmlTrackElements via bracket notation (`list[0]`) unlike TextTrackList. This adds that feature.
2016-11-14 15:32:30 -05:00
Brandon Casey
72fcb6c659 chore(pr_template): add checkbox to verify changes in a browser (#3775) 2016-11-14 15:28:01 -05:00
Gary Katsevman
252bcee959 fix(html5): exit early on emulated tracks in html5 (#3772)
addRemoteTextTrack and removeRemoteTextTrack in Html5 tech assumed that
they are always called for native text tracks. However, Html5 tech can
have emulated text tracks. For those, we just exit early after the super
methods are called.
2016-11-11 14:35:04 -05:00
Greenkeeper
6b477bb737 chore(package): update karma-detect-browsers to version 2.2.3 (#3770)
https://greenkeeper.io/
2016-11-10 11:52:11 -05:00
Gary Katsevman
23f0fa05cb chore: fix CHANGELOG 5.13.1 header 2016-11-09 16:44:54 -05:00
Gary Katsevman
2a05633159 chore: fixup CHANGELOG for 5.13.1 release 2016-11-09 16:43:02 -05:00
Gary Katsevman
3fc9b83958 v5.13.1 2016-11-09 16:33:43 -05:00
Gary Katsevman
50f8ad214c 5.13.0 dummy commit 2016-11-09 16:32:57 -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
Greenkeeper
b6d521f472 chore(package): update grunt-accessibility to version 5.0.0 (#3747)
https://greenkeeper.io/
2016-11-09 11:42:42 -05:00
Gary Katsevman
4859bb9e3d chore: pin karma-detect-browsers to 2.1.0 (#3764)
See https://github.com/litixsoft/karma-detect-browsers/issues/17
2016-11-09 11:40:21 -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
Gary Katsevman
8d51235b30 docs(collaborator_guide): add collaborator guide (#3724)
This adds a collaborator guide that describes how to reply to issues and PRs and how to accept changes to the project.
2016-11-04 14:27: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
Gary Katsevman
11a096d60f docs(contributing.md): update CONTRIBUTING.md with latest info (#3722)
Update CONTRIBUTING.md with inspiration and dev certificate of origin from node's CONTRIBUTING.md.
Add grunt and doctoc npm scripts.
2016-11-04 14:21:05 -04:00
Pat O'Neill
5f42130b82 perf: Use ES6 rest operator and allow V8 to optimize mergeOptions (#3743)
The current implementation causes the `mergeOptions` function to be
de-optimized. This change improves readability by switching to ES6
syntax AND it results in a roughly 75% improvement in the performance
of this function by transpiling to a `for` loop instead of
`slice.call`.
2016-11-04 14:19:50 -04:00
Brandon Casey
6889e925b4 refactor: remove un-needed contructor and function overrides (#3721) 2016-11-04 14:18:30 -04:00
Garrett
b2c5b2a412 docs: Change registerSourceHandler param doc from first to index (#3737) 2016-11-04 14:18:10 -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
Gary Katsevman
74cddcad73 fix: currentDimension can return 0 for fluid player on IE (#3738)
This is because IE returns 0 for both getComputedStyle and currentStyle.
However, offsetHeight and offsetWidth do contain the correct values we
want. So, if before returning in currentDimension the return value is
still zero, check the offset values.
2016-11-03 18:41:27 -04:00
mister-ben
2e720afb65 fix: allow rounded value for fluid player ratio test (#3739) 2016-11-03 18:40:14 -04:00
Gary Katsevman
8f7eb121bb feat(lang): update uk.json (#3675) 2016-11-03 16:07:49 -04:00
Gary Katsevman
d11fd50a63 feat(lang): update ru.json (#3654) 2016-11-03 16:05:33 -04:00
doraeric
726367abc5 feat(lang): Complete work translated into traditional Chinese (#3718) 2016-11-03 16:00:29 -04:00
Gary Katsevman
9702618c02 feat: add a safe computedStyle to videojs. (#3664)
This is used internally in the seek bar and mouse time display.
In firefox, in an iframe that is hidden with "display: none",
getComputedStyle() returns "null" which can break things.
See https://bugzilla.mozilla.org/show_bug.cgi?id=548397 for more
details.
2016-11-03 15:59:34 -04:00
Owen Edwards
685404d018 fix: aria-live="assertive" only for descriptions
This changes aria-live on the text track display so it's off unless a
descriptions track is enabled.

Fixes #3554
2016-11-03 15:56:03 -04:00
Owen Edwards
202da2d468 feat(component): attribute get/set/remove methods
This adds getter and setter and remover methods for attributes on
components.
2016-11-03 15:54:53 -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