Lazy load video css

fastpreview
Varun Patil 2022-11-24 12:28:33 -08:00
parent ba24327fa4
commit fc889d6946
1 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,6 @@ import { showError } from "@nextcloud/dialogs";
import { translate as t } from "@nextcloud/l10n"; import { translate as t } from "@nextcloud/l10n";
import { getCurrentUser } from "@nextcloud/auth"; import { getCurrentUser } from "@nextcloud/auth";
import "video.js/dist/video-js.min.css";
import "plyr/dist/plyr.css";
import plyrsvg from "../assets/plyr.svg"; import plyrsvg from "../assets/plyr.svg";
// Lazy loading // Lazy loading
@ -140,6 +138,10 @@ class VideoContentSetup {
await Promise.all([ await Promise.all([
import("plyr").then((m) => (Plyr = m.default)), import("plyr").then((m) => (Plyr = m.default)),
import("videojs-contrib-quality-levels"), import("videojs-contrib-quality-levels"),
// @ts-ignore
import("video.js/dist/video-js.min.css"),
// @ts-ignore
import("plyr/dist/plyr.css"),
]); ]);
} }