@dnax/ui 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/QVideo.vue +17 -1
- package/package.json +1 -1
- package/shims.d.ts +6 -0
package/components/QVideo.vue
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
// Events : @ready (media element), @play, @pause, @ended, @timeupdate, @loadedmetadata, @volumechange.
|
|
9
9
|
// Méthodes exposées : play / pause / togglePlay / seek / getCurrentTime / getDuration / setVolume / setMuted / isPlaying.
|
|
10
10
|
import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue"
|
|
11
|
-
|
|
11
|
+
// Importé en texte brut + injecté côté client : passé dans le pipeline CSS normal, ce
|
|
12
|
+
// fichier tiers (build Tailwind de @videojs/html) contient du `@layer`/`@scope` natif qui
|
|
13
|
+
// casse le build des apps consommatrices en Tailwind v3 (PostCSS exige le `@tailwind`
|
|
14
|
+
// correspondant). L'injection runtime l'exclut de PostCSS sans perdre les styles globaux.
|
|
15
|
+
import skinCss from "@videojs/html/video/skin.css?raw"
|
|
12
16
|
|
|
13
17
|
interface Props {
|
|
14
18
|
/** URL de la vidéo (mp4, webm, ogg, HLS .m3u8, YouTube…) */
|
|
@@ -125,7 +129,19 @@ const onPlaceholderClick = () => {
|
|
|
125
129
|
play()
|
|
126
130
|
}
|
|
127
131
|
|
|
132
|
+
let skinInjected = false
|
|
133
|
+
const injectSkin = () => {
|
|
134
|
+
if (skinInjected || typeof document === "undefined") return
|
|
135
|
+
skinInjected = true
|
|
136
|
+
if (document.getElementById("q-video-skin")) return
|
|
137
|
+
const style = document.createElement("style")
|
|
138
|
+
style.id = "q-video-skin"
|
|
139
|
+
style.textContent = skinCss
|
|
140
|
+
document.head.appendChild(style)
|
|
141
|
+
}
|
|
142
|
+
|
|
128
143
|
onMounted(async () => {
|
|
144
|
+
injectSkin()
|
|
129
145
|
// Charge le framework HTML (custom elements) — uniquement côté client
|
|
130
146
|
await Promise.all([
|
|
131
147
|
import("@videojs/html/video/player" as string),
|
package/package.json
CHANGED