Implemented HLS player (client-side), added scaffold for server-side HLS streamer
This commit is contained in:
16
web/js/pages/video_player.js
Normal file
16
web/js/pages/video_player.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { url_params } from '/web/js/lib/search_params.js'
|
||||
|
||||
const src = `/hls/index.m3u8?lib=${url_params.get("lib")}&path=${url_params.get("path")}`
|
||||
|
||||
const player = videojs('video-player', {
|
||||
autoplay: true,
|
||||
})
|
||||
|
||||
|
||||
player.ready(() => {
|
||||
player.src({
|
||||
src,
|
||||
type: 'application/x-mpegURL'
|
||||
})
|
||||
player.play()
|
||||
})
|
||||
Reference in New Issue
Block a user