@banou/media-player 0.2.5 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banou/media-player",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -30,6 +30,7 @@ overflow: hidden;
30
30
  `
31
31
 
32
32
  export type ChromeOptions = {
33
+ publicPath: string
33
34
  customOverlay?: ReactNode
34
35
  isPlaying?: boolean
35
36
  loading?: boolean
@@ -54,6 +55,7 @@ export type ChromeOptions = {
54
55
 
55
56
  export default ({
56
57
  customOverlay,
58
+ publicPath,
57
59
  isPlaying,
58
60
  loading,
59
61
  duration,
@@ -137,7 +139,7 @@ export default ({
137
139
  canvas: canvasElement,
138
140
  subContent: subtitleTrack.data,
139
141
  fonts: fonts.filter(Boolean).map(([,filename]) => filename as string),
140
- availableFonts: { ...Object.fromEntries(fonts), 'liberation sans': new URL('/build/default.woff2', new URL(window.location.toString()).origin).toString() },
142
+ availableFonts: { ...Object.fromEntries(fonts), 'liberation sans': `${publicPath}default.woff2` },
141
143
  workerUrl: libassWorkerUrl, // Link to WebAssembly-based file "libassjs-worker.js",
142
144
  modernWasmUrl: wasmUrl
143
145
  })
package/src/index.tsx CHANGED
@@ -447,6 +447,7 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
447
447
  <Chrome
448
448
  className="chrome"
449
449
  customOverlay={customOverlay}
450
+ publicPath={publicPath}
450
451
  isPlaying={isPlaying}
451
452
  video={videoRef}
452
453
  needsInitialInteraction={needsInitialInteraction}