@banou/media-player 0.10.53 → 0.10.55

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.
Files changed (81) hide show
  1. package/dist/{ar-CWVutin3.js → ar-CSjwFY8l.js} +2 -0
  2. package/dist/{cs-CmwRGxyE.js → cs-Dk6IDwX9.js} +2 -0
  3. package/dist/{de-DLdKEf3t.js → de-G319tpSe.js} +2 -0
  4. package/dist/{el-Ckj-z6DX.js → el-CtRdEeUl.js} +2 -0
  5. package/dist/engine/index.d.ts +2 -0
  6. package/dist/engine/index.js +2 -2
  7. package/dist/engine/playback.d.ts +2 -0
  8. package/dist/engine/subtitle-convert.d.ts +8 -0
  9. package/dist/engine/subtitles.d.ts +2 -0
  10. package/dist/{engine-03XT1hpH.js → engine-tBJeFD6J.js} +341 -203
  11. package/dist/{es-419-zORhhU8D.js → es-419-BzuTB161.js} +2 -0
  12. package/dist/{fr-BtPmNkri.js → fr-BC0Ncjsm.js} +2 -0
  13. package/dist/{he-Bu79qEth.js → he-UutSGaSy.js} +2 -0
  14. package/dist/{hi-BsH3tSHa.js → hi-kNW0VH4d.js} +2 -0
  15. package/dist/{hu-BkYBW-YP.js → hu-UJBXN0lB.js} +2 -0
  16. package/dist/{id-nUaBCV4o.js → id-DYADKCdp.js} +2 -0
  17. package/dist/index.d.ts +4 -3
  18. package/dist/index.js +1188 -953
  19. package/dist/{it-CqPSHyFA.js → it-GodcqBoI.js} +2 -0
  20. package/dist/{ja-DTjvriHw.js → ja-r3FM4zNQ.js} +2 -0
  21. package/dist/{ko-dV8T7XOJ.js → ko-kNn9SZJT.js} +2 -0
  22. package/dist/labels.d.ts +2 -0
  23. package/dist/{ms-VZQ7BI0z.js → ms-B_95sgk7.js} +2 -0
  24. package/dist/{nl-Q6iDxbDz.js → nl-DUua8lM5.js} +2 -0
  25. package/dist/{pl-BN7bK74l.js → pl-DYN3cCvL.js} +2 -0
  26. package/dist/{pt-BR-CPFILeFW.js → pt-BR-CRH5nyyj.js} +2 -0
  27. package/dist/react/components/chrome.d.ts +3 -2
  28. package/dist/react/components/control-bar.d.ts +3 -2
  29. package/dist/react/hooks/use-playback.d.ts +1 -5
  30. package/dist/react/video-player.d.ts +29 -1
  31. package/dist/remote/index.d.ts +25 -2
  32. package/dist/remote/index.js +134 -68
  33. package/dist/remote/protocol.d.ts +22 -6
  34. package/dist/{ro-Bwcm-i3k.js → ro-lXdsKpft.js} +2 -0
  35. package/dist/{ru-D1FMz751.js → ru-Du_uJXdo.js} +2 -0
  36. package/dist/{sv-ci9K0Lkk.js → sv-CpEL6oGd.js} +2 -0
  37. package/dist/{th-DR-UBONQ.js → th-CQac_Jcd.js} +2 -0
  38. package/dist/{tr-BqhdfT22.js → tr-DLRAnIOh.js} +2 -0
  39. package/dist/{uk-8pkZqdni.js → uk-Cra5hJzT.js} +2 -0
  40. package/dist/{vi-3mKZ9G_M.js → vi-L2-IGJYQ.js} +2 -0
  41. package/dist/{zh-Hans-CDgigWKY.js → zh-Hans-Dp0UkPYn.js} +2 -0
  42. package/dist/{zh-Hant-3WSNI0ne.js → zh-Hant-CS16XV8X.js} +2 -0
  43. package/package.json +1 -1
  44. package/src/lib/engine/index.ts +3 -0
  45. package/src/lib/engine/playback.ts +18 -1
  46. package/src/lib/engine/subtitle-convert.ts +186 -0
  47. package/src/lib/engine/subtitles.ts +46 -7
  48. package/src/lib/index.tsx +7 -0
  49. package/src/lib/labels.ts +2 -0
  50. package/src/lib/locales/ar.json +2 -0
  51. package/src/lib/locales/cs.json +2 -0
  52. package/src/lib/locales/de.json +2 -0
  53. package/src/lib/locales/el.json +2 -0
  54. package/src/lib/locales/es-419.json +2 -0
  55. package/src/lib/locales/fr.json +2 -0
  56. package/src/lib/locales/he.json +2 -0
  57. package/src/lib/locales/hi.json +2 -0
  58. package/src/lib/locales/hu.json +2 -0
  59. package/src/lib/locales/id.json +2 -0
  60. package/src/lib/locales/it.json +2 -0
  61. package/src/lib/locales/ja.json +2 -0
  62. package/src/lib/locales/ko.json +2 -0
  63. package/src/lib/locales/ms.json +2 -0
  64. package/src/lib/locales/nl.json +2 -0
  65. package/src/lib/locales/pl.json +2 -0
  66. package/src/lib/locales/pt-BR.json +2 -0
  67. package/src/lib/locales/ro.json +2 -0
  68. package/src/lib/locales/ru.json +2 -0
  69. package/src/lib/locales/sv.json +2 -0
  70. package/src/lib/locales/th.json +2 -0
  71. package/src/lib/locales/tr.json +2 -0
  72. package/src/lib/locales/uk.json +2 -0
  73. package/src/lib/locales/vi.json +2 -0
  74. package/src/lib/locales/zh-Hans.json +2 -0
  75. package/src/lib/locales/zh-Hant.json +2 -0
  76. package/src/lib/react/components/chrome.tsx +4 -3
  77. package/src/lib/react/components/control-bar.tsx +51 -6
  78. package/src/lib/react/hooks/use-playback.ts +207 -15
  79. package/src/lib/react/video-player.tsx +116 -3
  80. package/src/lib/remote/index.ts +149 -12
  81. package/src/lib/remote/protocol.ts +32 -7
@@ -14,6 +14,7 @@ var e = "الصوت", t = "تم النسخ", n = "نسخ", r = "إيقاف", i =
14
14
  "Full screen (f)": "ملء الشاشة (f)",
15
15
  Mute: i,
16
16
  "Mute (m)": "كتم الصوت (m)",
17
+ "Next episode": "الحلقة التالية",
17
18
  "Normalize volume": "موازنة مستوى الصوت",
18
19
  "Now click your browser's pop out button": "انقر الآن على زر النافذة المنبثقة في متصفحك",
19
20
  Pause: a,
@@ -24,6 +25,7 @@ var e = "الصوت", t = "تم النسخ", n = "نسخ", r = "إيقاف", i =
24
25
  "Playback errors ({count})": "أخطاء التشغيل ({count})",
25
26
  "Playback failed": "فشل التشغيل",
26
27
  "Playback speed": "سرعة التشغيل",
28
+ "Previous episode": "الحلقة السابقة",
27
29
  "Put the subtitles in the picture": "دمج الترجمة في الصورة",
28
30
  "Put the subtitles in the video": "دمج الترجمة في الفيديو",
29
31
  Quality: s,
@@ -14,6 +14,7 @@ var e = "Zvuk", t = "Zkopírováno", n = "Kopírovat", r = "Vypnuto", i = "Ztlum
14
14
  "Full screen (f)": "Celá obrazovka (f)",
15
15
  Mute: i,
16
16
  "Mute (m)": "Ztlumit (m)",
17
+ "Next episode": "Další epizoda",
17
18
  "Normalize volume": "Vyrovnávat hlasitost",
18
19
  "Now click your browser's pop out button": "Teď klikněte na tlačítko obrazu v obraze ve svém prohlížeči",
19
20
  Pause: a,
@@ -24,6 +25,7 @@ var e = "Zvuk", t = "Zkopírováno", n = "Kopírovat", r = "Vypnuto", i = "Ztlum
24
25
  "Playback errors ({count})": "Chyby přehrávání ({count})",
25
26
  "Playback failed": "Přehrávání se nezdařilo",
26
27
  "Playback speed": "Rychlost přehrávání",
28
+ "Previous episode": "Předchozí epizoda",
27
29
  "Put the subtitles in the picture": "Vložit titulky do obrazu",
28
30
  "Put the subtitles in the video": "Vložit titulky do videa",
29
31
  Quality: s,
@@ -14,6 +14,7 @@ var e = "Audio", t = "Kopiert", n = "Kopieren", r = "Aus", i = "Stummschalten",
14
14
  "Full screen (f)": "Vollbild (f)",
15
15
  Mute: i,
16
16
  "Mute (m)": "Stummschalten (m)",
17
+ "Next episode": "Nächste Folge",
17
18
  "Normalize volume": "Lautstärke angleichen",
18
19
  "Now click your browser's pop out button": "Klicke jetzt auf die Bild-im-Bild-Schaltfläche deines Browsers",
19
20
  Pause: a,
@@ -24,6 +25,7 @@ var e = "Audio", t = "Kopiert", n = "Kopieren", r = "Aus", i = "Stummschalten",
24
25
  "Playback errors ({count})": "Wiedergabefehler ({count})",
25
26
  "Playback failed": "Wiedergabe fehlgeschlagen",
26
27
  "Playback speed": "Geschwindigkeit",
28
+ "Previous episode": "Vorherige Folge",
27
29
  "Put the subtitles in the picture": "Untertitel ins Bild einbetten",
28
30
  "Put the subtitles in the video": "Untertitel ins Video einbetten",
29
31
  Quality: s,
@@ -14,6 +14,7 @@ var e = "Ήχος", t = "Αντιγράφηκε", n = "Αντιγραφή", r =
14
14
  "Full screen (f)": "Πλήρης οθόνη (f)",
15
15
  Mute: i,
16
16
  "Mute (m)": "Σίγαση (m)",
17
+ "Next episode": "Επόμενο επεισόδιο",
17
18
  "Normalize volume": "Εξισορρόπηση έντασης",
18
19
  "Now click your browser's pop out button": "Τώρα πατήστε το κουμπί εικόνας σε εικόνα του προγράμματος περιήγησης",
19
20
  Pause: a,
@@ -24,6 +25,7 @@ var e = "Ήχος", t = "Αντιγράφηκε", n = "Αντιγραφή", r =
24
25
  "Playback errors ({count})": "Σφάλματα αναπαραγωγής ({count})",
25
26
  "Playback failed": "Η αναπαραγωγή απέτυχε",
26
27
  "Playback speed": "Ταχύτητα",
28
+ "Previous episode": "Προηγούμενο επεισόδιο",
27
29
  "Put the subtitles in the picture": "Ενσωμάτωση υποτίτλων στην εικόνα",
28
30
  "Put the subtitles in the video": "Ενσωμάτωση υποτίτλων στο βίντεο",
29
31
  Quality: s,
@@ -2,6 +2,8 @@ export { startPlayback, terminateRemuxer, MediaElementError, isMediaElementError
2
2
  export type { PlaybackOptions, PlaybackController, PlaybackOutput, MediaIndex, MediaChapter, AudioStream } from './playback';
3
3
  export { createSubtitleRenderer, SUBTITLES_OFF } from './subtitles';
4
4
  export type { SubtitleRenderer, SubtitleRendererOptions, SubtitleStream } from './subtitles';
5
+ export { toAssSubtitles } from './subtitle-convert';
6
+ export type { ExternalSubtitleFormat } from './subtitle-convert';
5
7
  export { createThumbnailGenerator } from './thumbnails';
6
8
  export type { ThumbnailGenerator, ThumbnailGeneratorOptions, ThumbnailImage } from './thumbnails';
7
9
  export { getTimeRanges, updateSourceBuffer } from './source-buffer';
@@ -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-03XT1hpH.js";
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 };
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "../engine-tBJeFD6J.js";
2
+ export { e as DEFAULT_BUFFER_SIZE, s as MediaElementError, f as SUBTITLES_OFF, d as createPictureInPicture, n as createSubtitleRenderer, l as createThumbnailGenerator, r as getTimeRanges, u as isMediaElementError, o as pictureInPictureMode, t as startPlayback, a as terminateRemuxer, i as toAssSubtitles, c as updateSourceBuffer };
@@ -94,6 +94,8 @@ export type PlaybackController = {
94
94
  /** The element this pipeline drives, so a caller can read what actually got buffered. */
95
95
  videoElement: HTMLVideoElement;
96
96
  selectSubtitleStream: (streamIndex: number | undefined) => void;
97
+ setExternalSubtitleTrack: (assContent: string) => void;
98
+ clearExternalSubtitleTrack: () => void;
97
99
  /** Keyframe index of the input, which is what maps a downloaded byte range onto the timeline. */
98
100
  indexes: MediaIndex[];
99
101
  /** Named spans the container declared, empty when it declared none. */
@@ -0,0 +1,8 @@
1
+ /** Format of an external subtitle track loaded outside the media container. */
2
+ export type ExternalSubtitleFormat = 'srt' | 'vtt' | 'ass';
3
+ /**
4
+ * Converts SubRip (`.srt`) or WebVTT (`.vtt`) text into a libass ASS script targeting a 1920x1080
5
+ * play resolution with `Liberation Sans` so `defaultFontUrl` and `cjkFontUrl` draw Latin and CJK
6
+ * glyphs without system font discovery. `.ass` inputs pass through unchanged aside from BOM removal.
7
+ */
8
+ export declare const toAssSubtitles: (content: string, format: ExternalSubtitleFormat, title?: string) => string;
@@ -63,6 +63,8 @@ export declare const createSubtitleRenderer: (options: SubtitleRendererOptions)
63
63
  pushAttachments: (incoming: Attachment[]) => void;
64
64
  pushFragments: (fragments: SubtitleFragment[]) => void;
65
65
  selectStream: (streamIndex: number | undefined) => void;
66
+ setExternalTrack: (assContent: string) => void;
67
+ clearExternalTrack: () => void;
66
68
  getStreams: () => SubtitleStream[];
67
69
  getSelectedStream: () => number | undefined;
68
70
  setOnStreams: (cb: (streams: SubtitleStream[]) => void) => void;