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

2747 Commits

Author SHA1 Message Date
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
David LaPalomento
f599ef4c51 Dispatch Flash events asynchronously (#3700)
Flash blocks until the javascript side of ExternalInterface callbacks complete and swallows any exceptions generated during that process. To avoid performance issues and missed exceptions, trigger events from Flash asynchronously.
2016-10-25 22:37:58 -04:00
Gary Katsevman
254683b5cd chore(changelog.md): update 5.12.6 and 5.12.3 (#3715)
5.12.6's changelog accidentally included all the 5.12.x changes and the
link to the comparison was from 5.10.7 to 5.12.6.

The comparison link in 5.12.3 was also updated to properly refer to
5.12.2 as the previous change.
2016-10-25 14:57:18 -04:00
Gary Katsevman
9e20386a94 v5.12.6 2016-10-25 14:49:25 -04:00
Gary Katsevman
fe760a44d7 fix: remove unnecessary comments from video.min.js (#3709)
This involves updating to latest version of uglify and setting
"screwIE8" to false since that is a default in 2.7. However, this makes
"preserveComments" "some" work as it is supposed to work.

Fixes #3707. This also comes from the stable branch after the 5.11.9
release.
2016-10-25 14:31:05 -04:00
Gary Katsevman
49e29bac85 fix: make sure that document.createElement exists before using (#3706)
If you try and require videojs in an environment that doesn't implement `document.createElement` properly -- like in Node.js -- you could potentially get an error. This checks that `window.document && window.document.createElement` is available before calling `createElement`.
We specifically check `window.document` so that `global` module won't cause issues with it's shimming of `document.createElement` in `global/document.

Fixes #3665
2016-10-25 14:20:49 -04:00
Gary Katsevman
ac0329f875 v5.12.5 2016-10-19 18:28:16 -04:00
Matthew Neil
7b9574bb19 fix: move html5 source handler incantation to bottom (#3695)
`Tech.withSourceHandlers(Html5);` expects the prototype getter/setters to exist. Moving these functions after the getters/setters allows them to function properly.
2016-10-19 18:20:30 -04:00
Gary Katsevman
c51f22680f v5.12.4 2016-10-18 16:32:28 -04:00
Hein Haraldson Berg
66922a818e docs(tech.md): Add a note on Flash permissions in sandboxed environments (#3684) 2016-10-18 14:45:15 -04:00
Curtis Gibby
16c855931b docs(options.md): Remove Bad Apostrophe (#3677)
A possessive belonging to an "it" doesn't need an apostrophe. Don't believe me? Ask [the Oatmeal](http://theoatmeal.com/comics/apostrophe) (look for the velociraptor)!
2016-10-18 14:43:25 -04:00