mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(html): remove redundant CDN CSS files and inline background skin styles (#1071)
This commit is contained in:
@@ -8,7 +8,6 @@ export function generateHTMLCode(skin: Skin): string {
|
||||
const cdnFile = skin === 'default' ? 'video' : 'video-minimal';
|
||||
|
||||
return `<script type="module" src="${CDN_BASE}/${cdnFile}.js"></script>
|
||||
<link rel="stylesheet" href="${CDN_BASE}/${cdnFile}.css" />
|
||||
|
||||
<video-player>
|
||||
<${skinTag}>
|
||||
|
||||
@@ -121,15 +121,13 @@ function generateJS(useCase: UseCase, skin: Skin, renderer: Renderer): string {
|
||||
const mediaImport = mediaSubpath ? `\nimport '@videojs/html/media/${mediaSubpath}';` : '';
|
||||
return `import '@videojs/html/background/player';
|
||||
import '@videojs/html/background/skin';
|
||||
import '@videojs/html/background/skin.css';
|
||||
import '@videojs/html/background/video';${mediaImport}`;
|
||||
}
|
||||
const { group, skinFile } = getSkinImportParts(skin);
|
||||
const mediaSubpath = getMediaImportSubpath(renderer);
|
||||
const mediaImport = mediaSubpath ? `\nimport '@videojs/html/media/${mediaSubpath}';` : '';
|
||||
return `import '@videojs/html/${group}/player';
|
||||
import '@videojs/html/${group}/${skinFile}';
|
||||
import '@videojs/html/${group}/${skinFile}.css';${mediaImport}`;
|
||||
import '@videojs/html/${group}/${skinFile}';${mediaImport}`;
|
||||
}
|
||||
|
||||
export default function HTMLUsageCodeBlock() {
|
||||
|
||||
Reference in New Issue
Block a user