Elegant HTML5 video player.
https://luna.liriliri.io/?path=/story/video-player
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-video-player/luna-video-player.css" />
<script src="//cdn.jsdelivr.net/npm/luna-video-player/luna-video-player.js"></script>
You can also get it on npm.
npm install luna-video-player --save
import 'luna-video-player/luna-video-player.css'
import LunaVideoPlayer from 'luna-video-player'
const container = document.getElementById('container')
const videoPlayer = new LunaVideoPlayer(container, {
url: 'https://api.dogecloud.com/player/get.mp4?vcode=9dbb405e2141b5e8&userId=2096&flsign=1c02d5e60d2a0f29e1fd2ec0c0762b8b&ext=.mp4',
})
videoPlayer.play()
- hotkey(boolean): Enable hotkey.
- url(string): Video url.
Pause video.
Play video.
Seek to specified time.
Set video volume.