@banou/media-player 0.10.24 → 0.10.26

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/README.md CHANGED
@@ -25,6 +25,7 @@ import MediaPlayer from '@banou/media-player'
25
25
  jassubWasmUrl={jassubWasmUrl}
26
26
  jassubLegacyWasmUrl={jassubLegacyWasmUrl}
27
27
  defaultFontUrl={defaultFontUrl}
28
+ cjkFontUrl={cjkFontUrl}
28
29
  title="episode.mkv"
29
30
  autoplay
30
31
  />
@@ -93,6 +94,12 @@ reads as a browser bug rather than a missing asset. Serve both.
93
94
 
94
95
  `libavWorkerUrl` (`libav-wasm/build/worker.js`) is named individually and still copies fine.
95
96
 
97
+ `cjkFontUrl` is this package's own `noto-sans-jp.otf` (`import cjkFontUrl from
98
+ '@banou/media-player/noto-sans-jp.otf?no-inline&url'`), Noto Sans JP cut to the JIS X 0208 kanji. jassub's libass has no
99
+ system font fallback, so without it Japanese in a style whose font has no Japanese, which is how releases set song
100
+ lyrics, draws as empty boxes. It is fetched only once the selected track shows CJK text, after `defaultFontUrl`,
101
+ and draws only the glyphs that face lacks.
102
+
96
103
  `normalizerWorkletUrl` is this package's own `dist/volume-normalizer-worklet.js`, one plain module with no imports
97
104
  that copies fine or imports as a url; see [the volume normalizer](#the-volume-normalizer).
98
105
 
@@ -164,7 +171,8 @@ is persisted: volume, speed and track choices start at their defaults every load
164
171
 
165
172
  The shortcuts (Space or `k`, `f`, `m`, the arrow keys, and `<` and `>` to pause and step one frame back or forward)
166
173
  listen on the whole page, and leave Ctrl, Cmd and Alt combinations to the browser. The frame steps need a media
167
- with `requestVideoFrameCallback`, which a `media` playing in another document does not have. Pass `shortcuts="player"`
174
+ with `requestVideoFrameCallback`, which a `media` playing in another document does not have; its host can pass
175
+ `stepFrame` to make the step inside that document instead. Pass `shortcuts="player"`
168
176
  for a player among other content: a key then acts only from inside the player (a click on the picture puts the focus
169
177
  there) or while it is fullscreen, and Space and the arrows keep scrolling the page everywhere else.
170
178
 
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-BdouHadr.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-AjFLuCdA.js";
2
2
  export { i as DEFAULT_BUFFER_SIZE, e as MediaElementError, a as SUBTITLES_OFF, u as createPictureInPicture, d as createSubtitleRenderer, c as createThumbnailGenerator, n as getTimeRanges, s as isMediaElementError, o as pictureInPictureMode, l as startPlayback, t as terminateRemuxer, r as updateSourceBuffer };
@@ -61,6 +61,7 @@ export type PlaybackOptions = {
61
61
  /** jassub's non-SIMD build; without it subtitles fail rather than degrade on Safari before 16.4 */
62
62
  jassubLegacyWasmUrl?: string;
63
63
  defaultFontUrl?: string;
64
+ cjkFontUrl?: string;
64
65
  bufferSize?: number;
65
66
  audioStreamIndex?: number;
66
67
  onReady?: () => void;
@@ -38,6 +38,14 @@ export type SubtitleRendererOptions = {
38
38
  * given on `workerFetched`.
39
39
  */
40
40
  defaultFontUrl?: string;
41
+ /**
42
+ * Noto Sans JP, `@banou/media-player/noto-sans-jp.otf`, for Japanese text the file's own fonts cannot draw.
43
+ *
44
+ * Fetched only once a line on the selected track holds CJK text, after `defaultFontUrl`. It draws only the
45
+ * glyphs `liberation sans` lacks, so a url that fails to load leaves those as boxes and changes nothing
46
+ * else. May be relative, as `defaultFontUrl`.
47
+ */
48
+ cjkFontUrl?: string;
41
49
  onStreams?: (streams: SubtitleStream[]) => void;
42
50
  };
43
51
  export type SubtitleRenderer = ReturnType<typeof createSubtitleRenderer>;