WARNING: Highly early project. The stable version of this project has not been released (Release v1.0.0) and should not be used in production.
VideoJS Skin like YT.
This is a component to connect other supported VideoJS plugins and use to make the VIdeoJS like YT. We also improve some original VideoJS experience.
Connect to other VideoJS Plugin (Checked means support, unchecked means it will be supported in the future):
- videojs-settings-menu : This is also a very early project, hope the author will continue to maintain it.
- videojs-dash-hls-bitrate-switcher : Use with videojs-settings-menu.
- videojs-mobile-ui : Improved mobile experience.
- videojs-hotkeys : Adds more hotkey support to VideoJS.
- videojs-vtt-thumbnails : Display the thumbnails in seeking.
- videojs-chromecast : Support Chromecast.
- videojs-airplay : Support AirPlay.
And more (You can tip me on Issues).
- Installation
- Package out from NPM
- Usage
- Added Features
- License
npm install --save videojs-yt-style
git clone https://github.com/paidless/videojs-yt-style.git
cd videojs-yt-style
npm install
npm run build-offline
Now you can take build/
out to anywhere.
To include videojs-yt-style on your website or web application, use any of the following methods.
This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs
global is available.
<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-yt-style.min.js"></script>
<script>
var player = videojs('my-video');
player.ytStyle();
</script>
When using with Browserify, install videojs-yt-style via npm and require
the plugin as you would any other module.
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-yt-style');
var player = videojs('my-video');
player.ytStyle();
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require
the plugin as you normally would:
require(['video.js', 'videojs-yt-style'], function(videojs) {
var player = videojs('my-video');
player.ytStyle();
});
Show a bezel bar in player.
BezelText
: bezel text elementBezelTextWrapper
: bezel text wrapper elementBezel
: Control the whole bezel action
You can call following method like: player.getChild('Bezel').something();
.
getChild('Bezel').display(string)
: Show specific text 0.5s
Add the fps attributes to player.
fps_.fps
(Type: Integer) : evaluated video fpsfps._certainty
(Type: Integer) : evaluate certainty
fps(value)
(Return type: Integer) : return the evaluated video fps
fpsupdate
: evaluate fps updated
Add a player option to keep time tooptip in seeb bar.
Original this PR.
keepTimeTooltipInSeekBar
(Type: Boolean) : Prevents the time tooltip overflow the seek bar
Add a component to progress bar, use it to grow user can hover the progress bar size.
You can use the .vjs-progress-bar-padding
css class to set the style.
Add some css var of player size.
--player-width
(Unit: Pixel) : player width--player-height
(Unit: Pixel) : player height
A better way to control subtitle.
subtitles
: This is a subtitle manager instance, you can found all method in sourcesrc/js/components/subtitle-manager.js
.
Keep volume setting in localStorage.
Include is only full window and fullwindow toggle manager.
alwaysEnableFullWindow
(Type: Boolean) : Always has are full window button.
isOnlyFullWindow()
(Type: Boolean) : Check if only full window is supported.
Add player method to fix live source can not get duration problem.
getDuration()
(Type: Number) : Get source duration.
Fix VideoJs ProgressBar is slow when dragging with Mouse.
problem: videojs/video.js#4460
UNLICENSED. Copyright (c) Ami-OS <grizzltty.app@gmail.com>