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

3219 Commits

Author SHA1 Message Date
Brandon Casey
1cb67ab9c9
refactor: move sourceset code out of tech (#5037) 2018-03-23 13:51:47 -04:00
Gary Katsevman
bc2da7c67b
refactor: remove IE8 specific changes (#5041)
BREAKING CHANGE: remove IE8, IE9, and IE10 specific JavaScript and CSS code. Remove Android 2.3 workaround.
2018-03-23 13:25:12 -04:00
Gary Katsevman
0a20d65c04
test: no longer test on IE8, IE9, or IE10 (#5032) 2018-03-19 17:14:56 -04:00
Gary Katsevman
874779402c 6.8.0 2018-03-19 14:50:48 -04:00
Gary Katsevman
9519740ea7 chore: update package-lock.json 2018-03-19 14:50:34 -04:00
Gary Katsevman
1b3c827d5e
feat: require enableSourceset option for event (#5031)
While sourceset is experimental, require the option `enableSourceset`.
This can easily be reversed in a minor update.
2018-03-19 13:47:45 -04:00
Mayde
d7f45bab89 docs(time-ranges): fix wrong comment for getRange function (#5026) 2018-03-16 10:58:37 -04:00
Mayde
bd6b31c48b docs(time-ranges): fix misspellings (#5025) 2018-03-16 10:57:07 -04:00
Gary Katsevman
46d8b37385
fix(sourceset): set evt.src to empty string or src attr from load (#5016)
If .load() is called, we don't know what the new source will be because of the asynchronous nature of the resource selection algorithm. However, we can know if the src attribute is set on the video element because that's what will be chosen. So, set the src property on the event object to be the src attribute or be the empty string. This matches how currentSrc works where it is an empty string when no source is set. So, when sourceset is triggered and src is "" in the event object, it means that the source is changing.
In addition, we're going to be releasing sourceset as an experimental feature so we could improve the API and make changes in minor releases.
2018-03-15 15:05:41 -04:00
Gary Katsevman
4e83cd3e3f
test(ResizeManager): only listen for one playerresize to make test not flaky (#5022) 2018-03-15 11:16:42 -04:00
Mayde
ebbe86812b docs(component): fix misspelllings (#5019) 2018-03-15 10:18:48 -04:00
Mayde
1532df32fb docs(component): fix misspellings (#5017) 2018-03-15 10:18:22 -04:00
Gary Katsevman
8d86afdb75
revert: Revert "fix: force autoplay in Chrome (#4804)" (#5009)
This reverts commit 6fe7a9a.

The PR #4804, which fixes #4720, causes a regression #5005. When testing for the regression, the original issue is no longer reproducible so the fix should be backed out. If someone is still using the old version of chrome and seeing the behavior of #4720, they can continue using the versions of Video.js that contain the fixed made in #4804: 6.5.2, 6.6x, 6.7.x.

Fixes #5005.
2018-03-13 16:01:18 -04:00
Kevin Reynolds
d2f63ad364 feat: Use CSS grid for Caption Settings dialog to begin making it more responsive (#4997)
If CSS Grid is available, the Captions Settings Dialog will use it for the layout to begin making it more responsive.
It will fallback to the current layout method if CSS Grid isn't available.
2018-03-13 15:17:18 -04:00
Mayde
e833d3e3de chore(dom.js): Fix misspellings (#5008) 2018-03-13 12:04:18 -04:00
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