Slant video player component.
$ component install littlstar/slant-player
var Player = require('slant-player');
var el = document.querySelector('#player');
var player = new Player(el, {src: 'video.mp4'});
player.render();
new Player(parent, {src: 'video.mp4'});
parent
- Parent DOM Elementopts
- Player options where an option is:width
- player widthheight
- player heightsrc
- Video sourcecontrols
- slant-controls options
Plays the video player
player.play();
Pauses the video player
player.pause();
Sets the video player volume level
player.volume(0.8);
Muts the video player volume
player.mute();
Seek to position in seconds
player.seek(34);
Use a plugin with the player
player.use(plugin());
Shows the video player
player.show();
Hides the video player
player.hide();
Renders the video player in the DOM
player.render();
Destroys the video player in view
player.destroy();
MIT