Commit Graph
2980 Commits
Author SHA1 Message Date
hopechannel 029955a946 chore(lang): Add translation for "caption settings" in zh-TW.json (#4816) 2017-12-14 11:25:51 -05:00
Gary Katsevman 6fe7a9a3dd fix: force autoplay in Chrome (#4804)
Chrome has started pausing autoplaying video elements when they are
moved in the DOM. Here we need to make sure that if the video started
autoplaying, after we move the element in the DOM we call play again.

Fixes #4720.
2017-12-14 11:24:48 -05:00
Gary Katsevman 409a13e1f6 fix(html5): loop video el attributes in order (#4805)
Due to historical issues, we loops the settings attributes like muted
and autoplay in reverse order but we want to loop them in order.
2017-12-13 14:49:02 -05:00
Gary Katsevman 295889b36b chore: remove unused popup classes (#4792)
In v6, we moved away from popup due to accessibility reasons. It was
only used in the old VolumeMenuButton.

Fixes #4725.
2017-12-11 16:28:24 -05:00
Charlie Ryan 1a588f71cf fix: Seek to 0 if attempt is made to seek to negative value (#4799)
Fixes #4501
2017-12-11 16:25:41 -05:00
Gary Katsevman e187585748 6.5.1 v6.5.1 2017-12-04 18:24:08 -05:00
Thijs Triemstra 1672a6df35 docs: clarify text tracks are meant for any usage of Video.js, both video and audio (#4790) 2017-12-04 17:44:09 -05:00
Lorenzo Cinque e582c3c843 fix: Remove listener used to test if passive listeners are supported (#4787)
Once you have successfully tested that passive listeners are supported you should remove the test listeners :)
2017-12-04 17:43:37 -05:00
Chuong 2337c1bf43 fix: cannot drag on progress bar in IE9 (#4783)
fix #4773
2017-12-04 17:43:21 -05:00
Brandon Casey c5ae98b5de chore: css is not built initially on grunt dev (#4778) 2017-12-04 17:42:51 -05:00
Brandon Casey 904989de62 fix: off text tracks should be set based on current state (#4775) 2017-12-04 17:42:23 -05:00
Gary Katsevman 4dd000c809 docs: deploy docs using netlify (#4774)
This adds in the legacy docs into the repo and enables automatic deployment via netlify. The netlify-docs.js script will error out the build on netlify on master if we're not on a tagged commit so that it won't redeploy the docs unless there's a new release. If we're not on master or on master with a tagged commit, it will process with the deploy.
Also, this removes the API docs from being published with npm, fixes #4609.
2017-12-04 17:42:07 -05:00
emkayy 0f1b2606a0 fix: null check closest.getAttribute (#4763)
If the HTML element doesn't have a lang attribute, Edge throws an exception when calling closest.getAttribute because tag.closest('[lang]') returns an empty object (which will be coerced to true) instead of null.
2017-12-04 17:41:29 -05:00
Gary Katsevman 63bb3c0417 6.5.0 v6.5.0 2017-11-17 16:43:31 -05:00
Chuong 7a776eeeea fix: being able to toggle playback with middle click (#4756)
Uses the new Dom.isSingleLeftClick method to do the check we were doing previously.
Also, refactor the player.handleTechClick_() method to follow the new style of code.

Fixes #4689
2017-11-17 15:09:45 -05:00
shahlabs 1fcd5ae4b1 fix: trigger timeupdate during seek (#4754)
If the player is paused, when we seek, the time displays don't update. So, we trigger a timeupdate manually to let components know that the time has updated.
2017-11-17 12:01:29 -05:00
Brandon Casey bbea5cc7cb fix: only print element not in DOM warning on player creation (#4755) 2017-11-16 18:12:37 -05:00
Brandon Casey 06641e8694 test: update tests to use qunit 2 assert format (#4753) 2017-11-16 18:12:09 -05:00
Brandon Casey 3aae4b2336 test: clean up test warnings (#4752) 2017-11-16 18:11:55 -05:00
Pat O'Neill 26b0d2cadd fix(Player#play): Wait for loadstart in play() when changing sources instead of just ready. (#4743)
The core goal here is to make sure the following works in light of some middleware process that makes setting the source more async than next tick:

```js
player.src('...');
player.ready(() => player.play());
```

In fact, given this change, we should even be able to do:

```js
player.src('...');
player.play();
```

Unlike #4665, which would have clarified/changed the meaning of "ready", it remains a reflection of the tech's state and we make better use of the ability to queue things on that state and on the middleware `setSource` process.
2017-11-16 16:41:01 -05:00
Chuong 6cbe3edae4 refactor: player.userActive() (#4716) 2017-11-16 11:49:54 -05:00
Chuong eb909f0b34 refactor: player.usingNativeControls() (#4749) 2017-11-16 11:49:40 -05:00
Chuong 79b4355856 fix: only allow left click dragging on progress bar and volume control (#4613)
Previously, any mouse button interaction with the bars would cause a reaction but that's unexpected for right and middle mouse clicks. This PR makes it so right and middle mouse clicks are ignored for dragging and clicking.
2017-11-16 11:48:59 -05:00
Martin Bachwerk dc588dd6c5 fix: Avoid empty but shown title attribute with menu items and clickable components (#4746) 2017-11-16 11:27:19 -05:00
Chuong d447e9fe11 refactor: player.controls() (#4731) 2017-11-16 11:25:49 -05:00
Chuong c16fedf26d refactor: player.listenForUserActivity_() (#4719) 2017-11-16 11:24:32 -05:00
Ehsan Chavoshi 95d7832b0e chore(lang): update Persian translations (#4741) 2017-11-16 11:20:29 -05:00
Gary Katsevman 2da7af1137 perf: null out els on dispose to minimize detached els (#4745)
A we retained a lot of references to DOM elements in various components. Here we clear it up. Also, make sure that we remove unused listeners as they can retain objects as well.
Update evented mixin to null out the eventBusEl_ after the component is disposed.
Add a feature for components, to tell it not to auto-initialize the evented mixin.
Re-enable the tests that were removed in #4640.
2017-11-16 11:19:47 -05:00
Gary Katsevman d8aadd5bee feat: allow embeds via <video-js> element (#4640)
Add the ability to initialize Video.js with an element named video-js. This is because sometimes, seeing the native element is undesirable, plus, it's cool to have our own element.
Can be used just like the video embed.
IE9 is supported but only with dynamic sources as the source element can only be used inside of the video element.
2017-11-13 14:20:05 -05:00
FirefoxMetzger 46a7df2757 docs(readme): fixed a typo (#4730)
In section Quick Start two tags were closed using <script> instead of </script>
2017-11-08 15:54:30 -05:00
Brandon Casey acf4153963 feat: add a version method to all advanced plugin instances (#4714) 2017-11-07 15:48:24 -05:00
Ilya Piatrenka c213737f7a test: warning, if the element is not in the DOM (#4723)
Add test to #4698
2017-11-07 15:44:16 -05:00
Vinay acc641a8a2 fix: make the progress bar progress smoothly (#4591)
Update the position of the seek bar in a 30ms interval and then redraw inside of a requestAnimationFrame.
2017-11-07 15:43:50 -05:00
Gary Katsevman c7ad7b31f0 6.4.0 v6.4.0 2017-11-01 16:39:21 -04:00
Ilya Piatrenka 6f713ca713 feat: add warning if the element given to Video.js is not in the DOM (#4698)
Addresses #4697.
2017-11-01 14:20:21 -04:00
Chuong ad1b47bf84 refactor: player.dimension() (#4704) 2017-11-01 13:15:38 -04:00
Joe Forbes 9acbcd8410 fix: player.src() should return empty string if no source is set (#4711)
player.src() returns undefined for a new player but it should return '' like player.currentSrc() does and as the video element itself does.
2017-11-01 11:12:48 -04:00
Brandon Casey 9cf98006d5 fix: don't throttle duration change updates (#4635)
Right now the durationchange event is throttled with the other two events, timeupdate and loadedmetadata. This means that only one of those events will trigger an update if they all occur within 25ms of each other.

This functionality makes sense for timeupdate or loadedmetadata as those should not indicate a time update (even though they often do).

For durationchange however it will always indicate a change in the duration, and we want to always update the display when it happens. Here is a scenario of how we could show duration incorrectly right now:

User is playing a video that has a postroll ad at the end. After the postroll ad their will be a timeupdate, and then a durationchange to signify that we are back in content. Then ended will fire, and no more events will happen.

The player will still show the duration of the ad, as the durationchange was eaten by the timeupdate that happened at nearly the same time.

Also, fix a potential issue where if the page was translated using google translate, the time displays stopped updating.
2017-10-31 15:24:01 -04:00
Bo Link 855adf35a1 fix: aria-labelledby attribute has an extra space (#4708)
The aria-labelledby attribute on the fontPercent, edgeStyle, and
fontFamily select options inlcudes an extra space since there is
no ledgendId variable being set on the createElFont_() method. This
fix adds a check to see if the legendId value is set or not inside
the createElSelect_() method. This should keep the extra space
from appearing on the select tags created by the createElFont_()
method.

Fixes #4688
2017-10-31 15:20:15 -04:00
Brandon Casey a3c254eeb8 feat: allow progress controls to be disabled (#4649)
Add `enable` and `disable` methods to the progress control. This disabled things like the mouse time display and the progress control continues updating for current time and loading but the user will not be able to interact with the control anymore.
2017-10-31 14:50:31 -04:00
Marc A. Modrow bebca9ce0b fix: make parseUrl helper always have a protocl (#4673)
Fixes #3100.
2017-10-31 14:48:12 -04:00
Matthew McClure e2af322313 chore: add GA note to primary readme (#4481) 2017-10-31 14:12:14 -04:00
Gary Katsevman 93e7670581 docs(lang): update translations needed doc (#4702) 2017-10-31 12:17:59 -04:00
Chuong b40858bc49 refactor: component.ready() (#4693) 2017-10-31 12:04:07 -04:00
Chuong a1748aa590 refactor: player.techGet_() (#4687) 2017-10-31 12:03:49 -04:00
Chuong cde83351fb refactor: player.hasStarted() (#4680) 2017-10-31 12:03:33 -04:00
Brandon Casey 5e9655f4a0 feat: set the play progress seek bar to 100% on ended (#4648) 2017-10-31 12:02:53 -04:00
Gary Katsevman 45a6b3010d test: fix modal dialog test for showing controls (#4707)
Also, add a test that verifies the behavior for the PR (#4690).

Fixes #4706.
2017-10-31 11:35:01 -04:00
Marc A. Modrow 79639138ba fix: Events#off threw if Object.prototype had extra enumerable properties, don't remove all events if off receives a falsey value (#4669)
If Object.prototype was modified to have extra properties, the `off` method crashed because `data.handlers` would've been removed before getting to the extra property.

Also, this fixes an issue where if a falsey value was passed to off, the events system would remove all the events, i.e. `player.off('')`. Instead, we make sure that only if it is called as `player.off()` will they be removed.
2017-10-30 18:06:41 -04:00
Nicolas Levy afea980174 fix: Don't enable player controls if they where disabled when ModalDialog closes. (#4690) 2017-10-30 18:00:14 -04:00