const html = { main: (options, index, tran, icons) => `
${html.video(true, options.video.pic, options.screenshot, options.preload, options.video.url, options.subtitle)} ${options.logo ? ` ` : ``}
${options.danmaku ? `${tran('Danmaku is loading')}` : ``}
${tran('Set danmaku color')}
${tran('Set danmaku type')}
0:00 / 0:00 ${options.live ? `${tran('Live')}` : ''}
${options.video.quality ? `
${html.qualityList(options.video.quality)}
` : ``} ${options.screenshot ? ` ${icons.get('camera')} ` : ``}
${options.subtitle ? `
` : ``}
${html.contextmenuList(options.contextmenu, tran)}
`, danmakumargin: (margin) => { let result = ''; if (margin) { for (const key in margin) { result += `${key}:${margin[key]};`; } } return result; }, contextmenuList: (contextmenu, tran) => { let result = '
'; for (let i = 0; i < contextmenu.length; i++) { result += `
${tran(contextmenu[i].text)}
`; } result += '
'; return result; }, qualityList: (quality) => { let result = '
'; for (let i = 0; i < quality.length; i++) { result += `
${quality[i].name}
`; } result += '
'; return result; }, video: (current, pic, screenshot, preload, url, subtitle) => { const enableSubtitle = subtitle && subtitle.type === 'webvtt'; return ` `; }, setting: (tran, icons) => ({ 'original': `
${tran('Speed')}
${icons.get('right')}
${tran('Loop')}
${tran('Show danmaku')}
${tran('Unlimited danmaku')}
${tran('Opacity for danmaku')}
`, 'speed': `
0.5
0.75
${tran('Normal')}
1.25
1.5
2
` }) }; module.exports = html;