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

337 Commits

Author SHA1 Message Date
Vitalii Tverdokhlib
0090b75672 fix(lang): add is loading ru translation (#5630) 2018-11-30 10:49:24 -05:00
Gary Katsevman
287b267305
docs: update starter template (#5570)
Use a codepen template for the starter template that includes the latest version of Video.js.

The template is at https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0

Fixes #5562
2018-11-14 13:45:20 -05:00
Grzegorz Blaszczyk
f1784587f6 feat: add 'replay' option to the PlayToggle component. (#5531)
The `PlayToggle` has one option `replay` which can show or hide replay icon. This can be set by passing `{replay: false}` as the default behavior replay icon is shown after video end playback.

Example of how to hide a replay icon
 ```js
let player = videojs('myplayer', {
  controlBar: {
    playToggle: {
      replay: false
    }
  }
});
```

Fixes #4802
2018-11-02 16:47:52 -04:00
Pat O'Neill
6df3ac78d4 feat: Add responsive option, which enables breakpoints support. (#5496)
Follow-up for #5471

This makes the breakpoints option and `breakpoints()` method clearer and introduces the responsive option and `responsive()` method, which will turn on the breakpoints.

The return value of `currentBreakpoint()` was simplified to only ever return a string (empty if none).

Also, added convenience methods: `responsive()`, `getBreakpointClass()`, and `currentBreakpointClass()`.
2018-10-11 17:03:33 -04:00
Pat O'Neill
51bd49f4bc feat: Add breakpoints option to support toggling classes based on player width. (#5471)
This adds a breakpoints option. By default, this option is false meaning this is an opt-in feature.

When passing true, it will use a default set of breakpoints. Or custom breakpoints can be passed if users do not like our breakpoints (or previously-existing style decisions).

- Add breakpoints option.
- Adds some new (currently unused) classes: vjs-layout-medium, vjs-layout-large, vjs-layout-x-large, and vjs-layout-huge.
- Add updateCurrentBreakpoint and currentBreakpoint methods to the player.
- Update css/components/_adaptive.scss
- Add sandbox/responsive.html.example

Closes videojs/video.js#4371
2018-10-10 15:30:20 -04:00
Gary Katsevman
794cd71682
docs(fixup): fixup docs (#5489) 2018-10-10 11:09:53 -04:00
Gary Katsevman
2e72fc3dec
docs(layout): document fluid and fill mode (#5481) 2018-10-05 15:28:19 -04:00
Gary Katsevman
966eb56c02
feat: createLogger for easier logging in individual modules (#5418)
Create a new createLogger module for better debugging. Each logger has its own log level and its own createLogger that will nest logs underneath them. `player.log` is also included, which logs the player id as part of the log statement. The history API also got a filter method.

For example:
```js
var log = videojs.log.createLogger('foo');
log('hello');
// > VIDEOJS: foo: hello
```
2018-09-28 16:52:58 -04:00
Gary Katsevman
c2eb138e66
chore(lang): update translations-needed doc (#5459) 2018-09-28 16:06:32 -04:00
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
Lionel
8c1302ee34 feat(lang): French translation update (#4118) 2017-02-22 14:25:53 -05:00
Gary Katsevman
db0112053f feat: allow tokens in localize, localize progress bar time (#4060)
It allows you to use string as an key for the language files but have a default value that's different. In this case, we have a key of progress bar timing: currentTime={1} duration={2} which is used so that we have a descriptive key to what is happening. The default value matches that default value in en.json: {1} of {2}. The reason for the default value is so that the translation uses {1} of {2} for the actual localization without requiring en.json to be included in videojs by default.

Fix #4024.
2017-02-21 16:17:00 -05:00
Gary Katsevman
0d0dea4da8 feat: fix accessibility of the captions setting dialog (#4050)
This fixes a lot of the issues from #2746 by making the dialog inherit from our actual ModalDialog which now has tab focus trapping.

The Captions Settings dialog has some accessibility issues:
- Field labels and fields are not explicitly associated
- Keyboard focus does not move into the dialog when it is opened
- Keyboard focus is not trapped inside the dialog while it is open
- Keyboard focus does not return to the control which opened the dialog when it is closed
- The extent (top and bottom) of the dialog is not indicated to screen readers
- The dialog cannot be closed with the Esc key
- The meaning of '---' in the select fields is not clear
- The control to close the dialog is labeled "Done" rather than "Close"
- The purpose of the "Defaults" button may not be obvious, and its effect may not be apparent to screen reader users
- Focus highlighting (outline) on the Default and Done buttons is *very* hard to see
- Pressing the Done button doesn’t seem to have the same effect as pressing the Close (x) button; does it trigger the same focus movement
- This requirement to move it back to the triggering element is tricky, since clicking on that item in the CC menu dismisses the CC menu. I need to think about this a little more - either the menu should open again, or the focus should go to the main CC Menu Button
- The focus outline on the whole dialog goes too far to the left (all the way to the edge of the video window, not just to the edge of the dialog)

Fixes #2746.
2017-02-21 15:58:04 -05:00
mister-ben
1cb0a97b0b fix: Do not create element for MediaLoader (#4097)
MediaLoader has a div that's unnecessary. See #4070. Also, make sure that Component#dispose does a null check for the element.
2017-02-21 15:50:52 -05:00
mister-ben
65dc81a4e1 docs: Add MediaLoader to components list (#4070) 2017-02-15 15:30:03 -05:00
Lionel
dc4c1eb88b fix: improve French translation (#4062)
Improved translation of "Casual"
2017-02-15 15:26:24 -05:00
Davy Tran
7ab52d1a59 docs: replace 'autoPlay' by 'autoplay' (#4080)
Fix #3995
2017-02-14 10:41:58 -05:00
Prayag Verma
2433915c64 docs(guides): fix typos in faq guide (#4067)
offical > official
2017-02-12 11:39:31 -05:00
Gary Katsevman
0ac126935a fix: localize aria-labels (#4027)
Fixes #2728.
2017-02-08 17:29:32 -05:00
mister-ben
0fc2c1c7a4 docs(guides): fix typos in functions guide (#4035) 2017-02-06 14:41:57 -05:00
RevinKey
70d2eb10cf feat(lang): update es.json (#3984) 2017-02-03 16:31:23 -05:00
Altay
37a6811fb6 feat(lang): Update tr.json (#3989) 2017-01-27 15:29:39 -05:00
Julien Bouquillon
05b39fe281 docs(guides): Add a basic ReactJS guide and update the FAQ (#3972) 2017-01-26 16:16:52 -05:00
Pat O'Neill
7b0d738e8f docs(guide): Add a ModalDialog guide (#3961) 2017-01-25 17:27:01 -05:00
mister-ben
8e7d8cc959 feat: localize all strings in captions settings (#3974) 2017-01-25 13:54:21 -05:00
Dinis Correia
8888e2b5b5 feat(lang): add European Portuguese translation (#3955) 2017-01-24 15:03:05 -05:00
ngoisaosang
1463e50f7b feat(lang): update Vietnamese lang file (#3964) 2017-01-24 15:00:19 -05:00
mister-ben
a0ba8e2360 feat(lang): DE and FR translations of replay (#3963) 2017-01-24 14:58:30 -05:00
Gary Katsevman
e642295468 docs(jsdoc): introduce a jsdoc template and build on publish (#3910)
Use the TUI JSDoc Template to generate the jsdoc files. Also, build this out on publish.
2017-01-24 11:26:39 -05:00
Brandon Casey
de3945db15 docs: ran npm run docs:fix to update TOC on guides (#3971) 2017-01-23 16:26:04 -05:00
Brandon Casey
58f2349302 docs: fix broken links to guides in the faq (#3973) 2017-01-23 16:25:58 -05:00
Brandon Casey
524f868e31 feat(volume panel): accessibly volume control (#3957)
Internally uses the VolumeControl and MuteToggle components to create the VolumePanel component. Acts like the old VolumeMenuButton but does not have the screen reader issues of the older version.

BREAKING CHANGE: remove VolumeMenuButton, introduce a new default volume control: VolumePanel.
2017-01-19 15:54:47 -05:00
Pat O'Neill
1ba1f5aabd feat: Time Tooltips (#3836)
Switch to `keepTooltipsInside` by default and simplify DOM structure around the time tooltips and progress control.

BREAKING CHANGE: removal of `keepTooltipsInside` option.
2017-01-19 15:30:47 -05:00
Pat O'Neill
8d1653aebc feat: Advanced Class-based Plugins for 6.0 (#3690) 2017-01-18 01:52:23 -05:00
mrocajr
ce6acc832a feat: Replay at ended (#3868)
Made the play button turn into a replay button at the end of the video.
Updated the translations needed docs with "replay".
2017-01-18 00:41:43 -05:00
Pat O'Neill
844e4f0107 feat: Log Levels (#3853)
Add a log levels and history api: `videojs.log.level()` and `videojs.log.history()`.
`.level()` will return the current level and you can also set it to be one of: `all`, `error`, `off`, or `warn`.
`.history()` will return a list of all things logged since videojs loaded. It can be disabled via `videojs.log.history.disable()` (and re-enabled with `enable()`) as well as cleared with `videojs.log.history.clear()`.
2017-01-18 00:35:42 -05:00
mister-ben
0ce7cd4fe3 docs(troubleshooting): updates to troubleshooting doc (#3912)
* Fixed (and simplified) the codecs header.
* Elaborated slightly on codecs and flash in v6
* Changed case of 'Video.js' throughout and some other capilatisation to be consistent with the doc
2017-01-05 11:36:49 -05:00
Gary Katsevman
e5a240a631 docs(faq): add a question about autoplay (#3898) 2017-01-03 15:05:12 -05:00
Gary Katsevman
9c74116578 docs(faq): add FAQ question about RTMP url (#3899) 2017-01-03 14:28:10 -05:00
Gary Katsevman
26789e7470 chore(faq): move FAQ and troubleshooting guide to docs/ (#3883) 2016-12-20 18:21:18 -05:00
Brandon Casey
642ad4b5cf docs: move examples out of code into docs 2016-12-20 18:20:31 -05:00
Brandon Casey
0493f54d6f chore(docs): Documentation Linting and TOC generation (#3841)
Use remark to lint and generate TOC for markdown files.
2016-12-20 16:55:59 -05:00
Brandon Casey
54ff1f97b8 docs: add a troubleshooting guide (#3814) 2016-12-02 15:39:35 -05:00
Brandon Casey
1d5562d656 docs(FAQ): add an faq (#3805) 2016-12-02 15:24:33 -05:00
Pat O'Neill
d24fe409e8 docs(guides): Manual Documentation Improvements (#3703) 2016-12-02 14:27:59 -05:00
Chuong
c5d1152456 docs: fix typo, extends -> extend (#3789) 2016-11-23 13:56:03 -05:00
Brandon Casey
77357b1cd2 feat: implement player lifecycle hooks and trigger beforesetup/setup hooks (#3639)
Allows you to hook into `beforesetup` and `setup` hooks for all players that are created by videojs.
2016-11-04 14:25:32 -04:00
Gary Katsevman
8f7eb121bb feat(lang): update uk.json (#3675) 2016-11-03 16:07:49 -04:00
Gary Katsevman
d11fd50a63 feat(lang): update ru.json (#3654) 2016-11-03 16:05:33 -04:00
doraeric
726367abc5 feat(lang): Complete work translated into traditional Chinese (#3718) 2016-11-03 16:00:29 -04:00
Hein Haraldson Berg
66922a818e docs(tech.md): Add a note on Flash permissions in sandboxed environments (#3684) 2016-10-18 14:45:15 -04:00