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')} ` : ``}
${icons.get('play')}
${icons.get('volume-down')}
0:00 / 0:00
${options.live ? `
${tran('Live')}` : ''}
${options.video.quality ? `
${options.video.quality[options.video.defaultQuality].name}
${html.qualityList(options.video.quality)}
` : ``}
${options.screenshot ? `
${icons.get('camera')}
` : ``}
${options.subtitle ? `
${icons.get('subtitle')}
` : ``}
${icons.get('full-in')}
${icons.get('full')}
${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 = '';
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 `
${enableSubtitle ? ` ` : ``}
`;
},
setting: (tran, icons) => ({
'original': `
${tran('Speed')}
${icons.get('right')}
${tran('Opacity for danmaku')}
`,
'speed': `
0.5
0.75
${tran('Normal')}
1.25
1.5
2
`
})
};
module.exports = html;