1.6.9 • Published 3 years ago
videojs-plus v1.6.9
VideoJS Plus
VideoJS Plus is an extension and skin for video.js.
Base Usage
Advancaed Usage
An Electron frameless application
Installation
npm install videojs-plus
# or
yarn add videojs-plus
Usage
- Just include the JS and CSS and use videojs normally
<html>
<head>
<link rel="stylesheet" href="videojs-plus.css" />
</head>
<body>
<video
id="example-video"
class="vjs-fluid"
poster="http://vjs.zencdn.net/v/oceans.png"
>
<source src="http://vjs.zencdn.net/v/oceans.mp4" />
</video>
</body>
<script src="http://vjs.zencdn.net/7.4.1/video.js"></script>
<script src="videojs-plus.umd.js"></script>
<script>
var player = videojs('example-video');
</script>
</html>
Examples In CodeSandbox
Features
- Dimensions of controls
You can change the dimensions of controls/menu by changing the
font-size
of.video-js
. For example,
.video-js {
@media (min-width: 1440px) {
font-size: 18px;
}
@media (min-width: 1680px) {
font-size: 20px;
}
}
- FindChild
A function that get player component.
For Example, you want to insert a button before
SettingMenuButton
.
const { parent, component, index } = player.findChild('SettingMenuButton')[0];
parent.addChild(new Button(player), {}, index);
// whithou findChild
const ControlBar = player.getChild('ControlBar');
const index = ControlBar.children_.indexOf('SettingMenuButton');
ControlBar.addChild(new Button(player), {}, index);
// or
videojs.getComponent('ControlBar').prototype.options_.children = [
//...
'Button',
'SettingMenuButton'
];
Plugins
- Autoplay
- Playlist
- Subtitles
- Quality
- Quality (HLS)
- Audio (HLS)
- FullWindow Toggle
- Electron Fullscreen Toggle
- Picture In Picture ( Experimental )
- Live ( Style plugins for live streaming )
- Unload
Tips
- language You can change the language of setting/context by VideoJS language feature. For example
const language = "zh-hk";
videojs("example-video". {
language
})
videojs.addLanguage(language, {
Speed: "速度",
Normal: "正常"
});
License
See Apache 2.0.
1.6.9
3 years ago
1.6.8
3 years ago
1.6.7
3 years ago
1.6.6
4 years ago
1.6.4
4 years ago
1.6.5
4 years ago
1.6.2
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.6.0-beta.1
4 years ago
1.5.9
4 years ago
1.5.8
4 years ago
1.5.7
5 years ago
1.5.6
5 years ago
1.5.5
5 years ago
1.5.4
5 years ago
1.5.3
5 years ago
1.5.2
5 years ago
1.5.1
5 years ago
1.5.0
5 years ago
1.5.0-rc9
5 years ago
1.5.0-rc8
5 years ago
1.5.0-rc7
5 years ago
1.5.0-rc6
5 years ago
1.5.0-rc5
5 years ago
1.5.0-rc4
5 years ago
1.5.0-rc3
5 years ago
1.5.0-rc2
5 years ago
1.5.0-rc1
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.1-rc1
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
2.0.0-rc7
5 years ago
2.0.0-rc6
5 years ago
2.0.0-rc4
5 years ago
2.0.0-rc3
5 years ago
2.0.0-rc2
5 years ago
2.0.0-rc1
5 years ago
1.1.0
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago