// We just want to display 'Off' instead of 'captions off', keep a space so the variable == true (hacky I know)
videojsUntyped.getComponent('CaptionsButton').prototype.label_ = ' '
-type PlayerMode = 'webtorrent' | 'p2p-media-loader'
+export type PlayerMode = 'webtorrent' | 'p2p-media-loader'
-type WebtorrentOptions = {
+export type WebtorrentOptions = {
videoFiles: VideoFile[]
}
-type P2PMediaLoaderOptions = {
+export type P2PMediaLoaderOptions = {
playlistUrl: string
}
-type CommonOptions = {
+export type CommonOptions = {
playerElement: HTMLVideoElement
autoplay: boolean
const commonOptions = options.common
const webtorrentOptions = options.webtorrent
const p2pMediaLoaderOptions = options.p2pMediaLoader
+ let html5 = {}
const plugins: VideoJSPluginOptions = {
peertube: {
}
Object.assign(plugins, { p2pMediaLoader, streamrootHls })
+ html5 = streamrootHls.html5
}
if (webtorrentOptions) {
}
const videojsOptions = {
+ html5,
+
// We don't use text track settings for now
textTrackSettings: false,
controls: commonOptions.controls !== undefined ? commonOptions.controls : true,