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

3354 Commits

Author SHA1 Message Date
Viktor S
ba6a71eb01 fix: don't add captions settings menu item when TextTrackSettings is disabled (#5002)
Removes the CaptionsSettingsMenuItem when TextTrackSettings is not included.

Fixes #4996
2018-03-13 12:03:39 -04:00
Gary Katsevman
43b5a6dc5f
chore: make sure first-timers bot uses our template (#5001) 2018-03-12 13:36:20 -04:00
twosmalltrees
2f96914b8e feat(format time): add setFormatTime for overriding the time format (#4962)
Add setFormatTime for Video.js to allow users to change the time format. Example usage:

```js
videojs.setFormatTime((seconds, guide) => `${seconds}, ${guide}`));
```

Add resetFormatTime to reset the time format to the default.

Fixes #2931
2018-03-07 14:37:10 -05:00
David GG
62ff3f66a5 feat: add mimetype type to source object when possible (#4469) (#4947)
File mimetype is filled when the file extension is known and type is not provided.

Fixes #4469, improves #4851.
2018-03-07 14:34:16 -05:00
Michael Vogel
8706941573 feat: Allow techs to change poster if player option techCanOverridePoster is set (#4921)
The option for the player techCanOverridePoster is introduced in this commit. It allows techs to update the post whenever they like. isPosterFromTech_ is introduced as a private player field in order to track when a poster was set by a tech. This allows us to clear the poster whenever the tech is disposed of by the player.

Additionally, attempting to set the same poster more than once will have no effect / no changes will be made, since the poster is the same. This was done in order to stop triggering multiple posterchange events when calling player.poster(aPoster) with techCanOverridePoster set to true.

When a tech is disposed and a poster was set by it, unset the poster.

Pass a `canOverridePoster` option to techs to know whether techCanOverridePoster was set.

Fixes #4910.
2018-03-07 14:31:50 -05:00
Brandon Casey
df96a74f6b feat: sourceset event (#4660)
Trigger a sourceset event whenever the source is set in the Html5 tech, including initial source. We override the video element's src and setAttribute methods so that we can trigger the sourceset event when people change the src with both the video element and our API methods.
The event object for sourceset will contain the src string that was provided at the time the sourceset was triggered. This is mostly important if a source is being set while a tech is changing.
A Tech has a featuresSourceset option that it can set to for sourceset handling. It can then call the helper triggerSourceset(src) to trigger the sourceset.
2018-03-07 14:28:37 -05:00
Edward Hummerston
1fa9dfbee2 docs(react guide): update guide to prevent memory leaks when components are disposed of (#4998)
When a component is disposed of, without calling ReactDOM.unmountComponentAtNode() on the data-reactroot in the destroyed component, the React.Component and videojs.Component (here EpisodeList and vjsEpisodeList) remain in memory.

The videojs.Component should listen for its dispose event and unmount its React root in the corresponding React.Component.
2018-03-07 12:09:06 -05:00
Gary Katsevman
5d689041fb 6.7.4 2018-03-05 17:32:08 -05:00
ookami125
7facc44893 fix(text-tracks): keep showing captions even if the text track settings were disabled (#4974)
If a user disabled the text track setting component, trying to play emulated captions would crash. Add a null check before applying the text track settings.

Fixes #4964.
2018-03-05 17:11:51 -05:00
Gary Katsevman
9c4ded8899
fix(events): triggering with an object had incorrect target property on event object (#4993)
Currently, trigger an event with an object rather than a string will have the document as a target on the event object rather than the element.
2018-03-05 16:42:06 -05:00
Pat O'Neill
5b5cc50608 fix: Fix an issue where disabling the progress control would throw an error. (#4986) 2018-03-05 14:44:34 -05:00
greenkeeper[bot]
270a23196a chore(package): update grunt-accessibility to version 6.0.0 🚀 (#4968)
* chore(package): update grunt-accessibility to version 6.0.0

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile
2018-02-28 11:15:25 -05:00
greenkeeper[bot]
2d64977736 fix(package): update videojs-vtt.js to version 0.12.6 (#4954) 2018-02-28 11:14:00 -05:00
Gary Katsevman
76bff32f7b 6.7.3 2018-02-22 17:30:40 -05:00
Pat O'Neill
50831e3381 fix: Add alternate text to the loading spinner. (#4916)
This is a first in a few changes related to #4902. This just adds a text alternative to the loading spinner. In future PRs, we would make it alert to screen readers and potentially have a generic alerting mechanism.
2018-02-22 16:19:35 -05:00
Gary Katsevman
0ace2a5449
fix: regression for getting a player via the tech's id (#4969)
As part of https://github.com/videojs/video.js/pull/4836, this piece of code was removed because it was thought it was not needed as everything else covers it. Turns out it's needed.

f6eaa5e2ae/src/js/video.js (L103-L107)
2018-02-22 14:22:12 -05:00
greenkeeper[bot]
aa5f3bfce0 chore: re-enable Greenkeeper 🌴 and make it update package-lock.json (#4967) 2018-02-20 15:02:00 -05:00
Gary Katsevman
f5c737327b
chore: add first-timers-issue-template.md (#4958) 2018-02-15 13:42:38 -05:00
jessicaweberdev
763a7f5762 docs(plugins guide): changed paused to pause where appropriate (#4957)
Fixes #4951
2018-02-14 13:43:55 -05:00
Ivan Čerjan
de9069fc5d fix(text-track-settings): fix track settings font class name (#4956)
Changed  className: 'vjs-track-settings-font">' to className: 'vjs-track-settings-font'

Fixes #4950, fixes #4879.
2018-02-14 13:41:15 -05:00
Zhulduz
7c30f97ef7 docs(react): Update docs for react tutorial (#4935) (#4952)
Using the default example, when disposing the player, a React DOMException was thrown because Video.js removed an element managed by React.
A simple solution is to wrap the player div in a separate div.

Fixes #4935.
2018-02-13 13:55:09 -05:00
Gary Katsevman
6a66e80c47 6.7.2 2018-02-13 10:43:54 -05:00
ldayananda
a434551555 docs(middleware): update the middleware guide with setTech and other corrections (#4926) 2018-02-12 18:55:08 -05:00
Ku Lok Sun
a1cef809b3 fix(progress control): Fix the video continuing to play when the user scrubs outside of seekbar (#4918)
Scrubbing inside the seekbar paused the player properly but scrubbing inside the progress control outside the seekbar, the player never paused. This meant that when you scrubbed, if you kept the mouse down but lingered for a moment, the player would continue playing until the mouse moved again.

This fixes it so that the seekbar mousedown and mouseup handlers are called when the progress control mousedown and mouseup handlers are triggered.
2018-02-12 17:34:44 -05:00
Gary Katsevman
29a8ee1d60
fix: cache middleware instances per player (#4939)
Middleware factories currently get run each time a source is set. Because middleware are assocated with a player, the factories should only run once per player.

This PR fixes it so that we associate a middleware instance with a middleware factory per player.
Each time a player is disposed, we will clear the cache of the middleware instances for that player.

Fixes #4677.
2018-02-12 17:30:27 -05:00
Alex Barstow
6189baac3c fix: Only select TextTrackMenuItem if unselected (#4920)
These changes address an issue where screen readers may repeatedly and redundantly read TextTrackMenuItem's control text on every texttrackchange event in some browsers.

The source of the problem is in the handleTracksChange() method of TextTrackMenuItem and its subclass OffTextTrackMenuItem, in which this.selected(true/false) gets called even if the selected state has not changed since its previous invocation.
2018-02-09 14:54:47 -05:00
Ku Lok Sun
4afabc2b0e docs: Fix the advance plugin example in documentation (#4923) 2018-02-09 14:16:18 -05:00
Gary Katsevman
7145a9cf1d 6.7.1 2018-01-31 11:19:12 -05:00
Gary Katsevman
7670db63cd
fix(middleware): do a null check in mediator methods (#4913) 2018-01-31 10:46:58 -05:00
Gary Katsevman
4404e071ba 6.7.0 2018-01-30 13:54:57 -05:00
Gary Katsevman
9ceb4e4fe0
feat: playerresize event in all cases (#4864)
Use ResizeObserver when available for better and more performant resizing information, otherwise, fall back to a throttled resize event on an iframe that's the size of the player.
Allows a video.js user to disable this by setting resizeManager: false as an option since the component will not be initialized.

Add a debounce util.

This reverts #4800 (e0ed0b5) because we end up getting two playerresize events with the dimension methods now.
2018-01-30 13:26:21 -05:00
Pat O'Neill
6a0057716b feat: Add videojs.getAllPlayers to get an array of players. (#4842) 2018-01-30 11:43:47 -05:00
ldayananda
bf3eb45a37 feat: add mediator middleware type for play() (#4868)
This will allow middleware to interact with calls to play() from the tech. This will require a method of indicating to middleware previously run that a middleware down the chain has terminated or stopped execution.

* Adds middleware mediator method that runs middleware from the player to the tech and a second time back up to the player. This category was created because play is both a setter(changes the playback state) and a getter(gets a native play promise if available). This also has the ability to tell whether a middleware has terminated before reaching the tech.
* Adds a middleware.TERMINATOR sentinel value that is available on the videojs object
* Adds play to the allowedMediators
* Adds paused to the allowedGetters
* Adds a sandbox example of a play mediator middleware
2018-01-30 11:30:42 -05:00
ldayananda
a34597123c docs: Update COLLABORATOR_GUIDE.md and CONTRIBUTING.md to include label meanings (#4874)
Add label meanings for collaborators to know when to put labels and to let contributors know what labels mean when they are applied.
2018-01-30 11:21:48 -05:00
mister-ben
f03ac5e9b5 fix: do not patch canplaytype on android chrome (#4885)
Patching canPlayType on Android shouldn't be necessary on Android Chrome since it reports its ability to player HLS correctly.
2018-01-30 11:20:33 -05:00
Pat O'Neill
a15e616a45 feat: Add getPlayer method to Video.js. (#4836) 2018-01-30 11:19:06 -05:00
Gary Katsevman
dcab42e3d0
chore(package): update dependencies (#4908) 2018-01-30 11:18:04 -05:00
Gary Katsevman
8b54737646
chore: generate a test example on netlify for PRs (#4912) 2018-01-30 11:17:41 -05:00
Gary Katsevman
41fd5cb4e6
test: add project and build names to browserstack (#4903) 2018-01-26 12:24:26 -05:00
Gary Katsevman
f6eaa5e2ae 6.6.3 2018-01-24 14:29:48 -05:00
Gary Katsevman
dc1813c7dc ignore: update package-lock.json 2018-01-24 14:29:38 -05:00
mrdtron
e628ccd555 fix: hide volume slider when the slider is not active and mute toggle button is in focus (#4866) 2018-01-24 13:51:44 -05:00
Gary Katsevman
ddfaf14b00
chore(docs site): use git commit message for netlify build (#4900) 2018-01-24 13:47:07 -05:00
ldayananda
673c231684
docs: add middleware guide (#4877)
* adding guide content

* fix link

* CR comments

* fixing a typo

* fixing example
2018-01-23 15:36:49 -05:00
Gary Katsevman
87cbd239f4
chore(package): update shelljs to version 0.8.1 (#4899)
Closes #4875
2018-01-23 15:02:08 -05:00
greenkeeper[bot]
2c5947649b chore(package): update remark-parse to version 5.0.0 (#4892) 2018-01-23 15:00:55 -05:00
greenkeeper[bot]
5b76bb16f9 chore(package): update remark-stringify to version 5.0.0 (#4893) 2018-01-23 14:59:17 -05:00
greenkeeper[bot]
aee4e6b343 chore(package): update remark-cli to version 5.0.0 (#4894) 2018-01-23 14:58:59 -05:00
Thijs Triemstra
83880b0f0b docs: fix some typos (#4880) 2018-01-22 17:07:05 -05:00
Gary Katsevman
f22cb50574 6.6.2 2018-01-05 17:04:12 -05:00