16 lines
316 B
JavaScript
16 lines
316 B
JavaScript
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()
|
|
}) |