1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-27 02:43:45 +02:00
Commit Graph

2966 Commits

Author SHA1 Message Date
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 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
Chuong
43ddc72c80 fix(css): update user-select none (#4678) 2017-10-30 17:59:28 -04:00
Chuong
cb638d0ea7 chore: add comment about avoiding helvetica font (#4679)
See issue #376 for more information.
2017-10-30 17:57:11 -04:00
Pat O'Neill
85fe685696 feat: Add videojs.hookOnce method to allow single-run hooks. (#4672) 2017-10-30 17:56:21 -04:00
mister-ben
ee2a49c18c chore(lang): Update Polish (#4686) 2017-10-30 17:52:58 -04:00
seggev319
32caf3556f feat(lang): add Hebrew translation (#4675) 2017-10-30 17:52:33 -04:00
estim
45e21fdcd0 feat(lang): Update for Russian translation (#4663) 2017-10-30 17:52:00 -04:00
greenkeeper[bot]
db2f14ce22 chore(package): update babelify to version 8.0.0 (#4684) 2017-10-24 14:16:47 -04:00
Brandon Casey
983a573928 test: get rid of redundant test logging (#4682) 2017-10-23 18:26:18 +00:00
Pat O'Neill
ec5b60329f chore: Add package-lock.json file. (#4641) 2017-10-19 11:49:04 -04:00
Pat O'Neill
0287f6e076 fix: Make sure we remove vjs-ended from the play toggle in all appropriate cases. (#4661) 2017-10-13 13:46:51 -04:00
Gary Katsevman
e8511a5799 chore(gh-release): no console log on success (#4657)
We've been printing the resulting value from a successful call to the ghrelease, this was useful for debugging but isn't necessary anymore.
Add the result to the error conditional with some headings.
2017-10-10 11:35:50 -07:00
Gary Katsevman
69577790eb 6.3.3 2017-10-10 13:52:45 -04:00
Brandon Casey
b1de506b43 fix: a possible breaking change caused by the use of remainingTimeDisplay (#4655) 2017-10-10 11:35:46 -04:00
TaeSoo 태수
6738f765da docs(hooks): Fix Typo (#4652) 2017-10-06 18:01:54 -07:00