const isHLS = mode === 'p2p-media-loader'
let autoplay = this.getAutoPlayValue(commonOptions.autoplay)
- let html5 = {}
+ let html5 = {
+ preloadTextTracks: false
+ }
const plugins: VideoJSPluginOptions = {
peertube: {
if (isHLS) {
const { hlsjs } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
- html5 = hlsjs.html5
+ Object.assign(html5, hlsjs.html5)
}
if (mode === 'webtorrent') {
const isLoopEnabled = player.options_['loop']
const items = [
{
- label: isLoopEnabled ? player.localize('Stop playing in loop') : player.localize('Play in loop'),
+ icon: 'repeat',
+ label: player.localize('Play in loop') + (isLoopEnabled ? '<span class="vjs-icon-tick-white"></span>' : ''),
listener: function () {
player.options_['loop'] = !isLoopEnabled
}
}
},
{
+ icon: 'code',
label: player.localize('Copy embed code'),
listener: () => {
copyToClipboard(buildVideoOrPlaylistEmbed(videoEmbedUrl, videoEmbedTitle))
})
}
- return items
+ return items.map(i => ({
+ ...i,
+ label: `<span class="vjs-icon-${i.icon || 'link-2'}"></span>` + i.label
+ }))
}
// adding the menu