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

278 Commits

Author SHA1 Message Date
Gary Katsevman
9c00267728
chore(https): update a lot of links to be https (#5372) 2018-08-10 15:13:32 -04:00
Gary Katsevman
781a6d87c6
feat(middleware): make setSource be optional (#5295)
setSource is useful if you care to be fiddling with the source or doing some work depending on what source is set. However, sometimes, you don't need a setSource and want the middleware to always be selected.
Now, if setSource is missing, it will implicitly be included in the middleware chain.
2018-07-06 14:16:16 -04:00
Brandon Casey
e8e4fe2745 feat(autoplay): extend autoplay option for greater good (#5209)
This PR extends the `autoplay` to the player with a few options that should hopefully make working with browsers that disable unmuted autoplay by default easier.
The current boolean option will match current behavior and any unknown option will be treated as it does now. The new options are the string values `muted`, `play`, and `any`.

- `muted` will mute the element and call `play()` on `loadstart`,
- `play` will call `play()` on `loadstart()`, this is similar to the `autoplay` attribute
- `any` will call `play()` on `loadstart()` but if it fails it will try muting the video and calling `play()` again.
2018-06-21 14:32:07 -04:00
Owen Edwards
f5a6e61627
docs(examples): remove IE9 text track HTML markup in the doc/examples, and update to use video.js v7.0 (#5192)
docs(examples): Remove IE9 text track HTML markup in the doc/examples, and update to use video.js v7.0 (#5192)

Video.js v7 drops support for versions of IE prior to IE11, so examples should not reference earlier versions.
2018-05-23 12:32:27 -07:00
Owen Edwards
0aa827fac5 fix(time-display): restore hidden label text for screen readers. (#5157)
Restore hidden label text for screen readers that describes what the button control does.

Renames the Duration Time language item to Duration.

Deprecate controlText_ property.

Fix a typo in translations-needed.md.

Add a space in the hidden label for live-display, so that it doesn't run together with the visible "LIVE" indication.

Fixes #5135
2018-05-11 14:34:33 -04:00
axten
d44682849e feat: add 'autoSetup' option (#5123)
this must be set globally with videojs.options.autoSetup = false in the same tick as videojs source is loaded to take effect

fixes #5094
2018-05-11 13:53:46 -04:00
Thijs Triemstra
62c1477615 docs(guides): add debugging section to index (#5100) 2018-04-17 14:48:04 -04:00
Thijs Triemstra
4399bdce5d docs(debugging): fix markup typo (#5086) 2018-04-11 11:39:33 -04:00
Thijs Triemstra
bec7f67c4a docs(languages): Use valid JSON in translation example (#5080) 2018-04-10 11:11:04 -04:00
Mayde
064c1be2ba docs: fix some misspellings (#5082) 2018-04-10 10:34:20 -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
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
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
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
jessicaweberdev
763a7f5762 docs(plugins guide): changed paused to pause where appropriate (#4957)
Fixes #4951
2018-02-14 13:43:55 -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
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
4afabc2b0e docs: Fix the advance plugin example in documentation (#4923) 2018-02-09 14:16:18 -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
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
Pat O'Neill
a15e616a45 feat: Add getPlayer method to Video.js. (#4836) 2018-01-30 11:19:06 -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
Thijs Triemstra
83880b0f0b docs: fix some typos (#4880) 2018-01-22 17:07:05 -05:00
Chuong
7c393e5c89 docs: wait for text track load with addRemoteTextTrack (#4855) 2018-01-05 14:45:48 -05:00
Gary Katsevman
df0d705cd8
chore(lang): update translations needed doc (#4858) 2018-01-03 17:21:58 -05:00
Garrett Singer
ba0f20ec35 feat: add support for debug logging (#4780)
Adds support for `debug` as an available logging method under `videojs.log`
Changes the default log level from `all` to `info`
2017-12-14 17:31:51 -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
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
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
Gary Katsevman
93e7670581
docs(lang): update translations needed doc (#4702) 2017-10-31 12:17:59 -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
TaeSoo 태수
6738f765da docs(hooks): Fix Typo (#4652) 2017-10-06 18:01:54 -07:00
Thijs Triemstra
85a34d1b49 docs: Document how to add a version number to a plugin (#4642) 2017-10-04 10:32:18 -04:00
Thijs Triemstra
d8ea23e0c9 docs: update player reference in advanced plugins doc (#4622) 2017-09-20 10:55:29 -04:00
Erik Demaine
9d249bb23b docs: Document playbackRates (#4602) 2017-09-19 17:44:36 -04:00
mister-ben
1f3375e485 docs: updates to faq, language guide, and minor edits (#4556) 2017-08-14 17:02:48 -04:00
mister-ben
e0824c8294 fix: Update translations to match correct string (#4383)
The lang files were translating "all settings to the default values" instead of "restore all settings to the default values".
2017-06-28 16:31:44 +10:00
Caley Shem-Crumrine
97021554cd docs: Update name of FullscreenToggle in documentation (#4410) 2017-06-27 09:52:05 +10:00
Gary Katsevman
a5a68e819a chore: update translations needed (#4380) 2017-05-25 18:32:17 -04:00
Adrian P. Blunier
2a26c7f87b feat(lang): Adding galician (#4334) 2017-05-25 18:15:33 -04:00
Owen Edwards
f773c473f9 chore: Fix examples and docs and some links (#4279)
* Fix the doc/example/elephantsdream/index.html file, add an index of doc/examples, and update CDN links to use video.js v5.19.
* Add poster from CDN to Elephants Dream examples.
2017-05-11 17:16:12 -04:00
Pat O'Neill
0a19cf0d6a feat: Add 'beforepluginsetup' event and named plugin setup events (e.g. 'pluginsetup:foo') (#4255)
This adds a beforepluginsetup event as well as beforepluginsetup:$name and pluginsetup:$name events.

The drive behind this is improving the ability for people to make cross-plugin dependencies in a more robust manner.
2017-05-11 17:13:22 -04:00
Dave Kiss
cff2e503ef docs(react-guide): Use a React component as a VJS component (#4287) 2017-05-11 16:33:28 -04:00
Aaron Chamberlain
230743ecb1 docs: add a Webpack usage guide (#4261) 2017-04-12 18:16:41 -04:00
Garrett
39fd73f781 docs: remove mentions of bower support (#4274)
Since video.js 6 no longer officially supports bower (#4012), remove some old mentions in the docs of bower.
2017-04-12 18:15:54 -04:00
Alex Barstow
02721c7c03 docs(component): Replace VolumeMenuButton with VolumePanel in component tree (#4267)
Video.js 6 has switch to using the VolumePanel instead of the VolumeMenuButton.

Fixes #4266
2017-04-07 13:39:57 -04:00
Brandon Casey
61e20786a9 docs: fix links in generated docs (#4200) 2017-03-21 17:13:06 -04:00
Brandon Casey
41be5dca4e docs: tech order will only have html5 by default (#4188) 2017-03-13 11:53:30 -04:00
Owen Edwards
af1c6e374c chore(docs): Use Elephants Dream video files from CDN for docs/examples/elephantsdream/ (#4181) 2017-03-13 10:54:15 -04:00