@banou/media-player 0.10.34 → 0.10.36

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
@@ -341,17 +341,28 @@ Pass the languages to start a file in, and save what the viewer picks:
341
341
  ```
342
342
 
343
343
  A preference is a tag or a name (`ja`, `ja-JP`, `jpn`, `Japanese`, `English (US)`), and a pick is reported the way the
344
- track names its language, its tag or else its title, or null for subtitles off. A file starts on its full track in the
345
- preferred language, never a commentary or a signs and songs track when a full one exists, and on its default when it has
346
- nothing in that language. What the viewer picks wins for that file. A subtitle track that names no language is reported
344
+ track names its language, its tag or else its title, or null for subtitles off. A file starts on its full audio track in
345
+ the preferred language, else on its default: a commentary or an audio description in it does not count. Subtitles start
346
+ on the full track in the language, else on a signs and songs one in it, else on the default. What the viewer picks wins
347
+ for that file. A subtitle track that names no language is reported
347
348
  by its title, and only when it turns subtitles on, so the next file starts with them on, on the track of that title if
348
349
  it has one.
349
350
 
351
+ To start in the viewer's own language, pass it as both preferences with `alwaysShowSubtitles={false}`: a file with audio
352
+ in it plays that audio with subtitles off, and any other plays its original audio with subtitles in it. Subtitles are
353
+ left off only where the audio plays in their language, so a picked audio language other than theirs keeps them on. The
354
+ original is the file's track in `originalLanguage` when the source knows it (`ja` for anime), else the file's default,
355
+ which is its first track: on a dual audio file whose first track is a dub, only `originalLanguage` finds the original.
356
+ `onAlwaysShowSubtitlesChange` reports true when the viewer turns on subtitles in the language the audio plays in, for
357
+ the app to pass back as `alwaysShowSubtitles`. The rule is `startingTracks(audio, subtitles, preferences)`, from
358
+ `@banou/media-player/language`.
359
+
350
360
  A media the player does not own reports picks the same way, by the option's label once the source's `select`
351
- resolves, and its host applies the preference to its own tracks: `preferredSelection(selection, preference)`, from
352
- `@banou/media-player/language`, names the option to select, and imports nothing else of the player. `languageTag(pick)`
353
- from the same module gives a pick's BCP 47 tag (`jpn` gives `ja`, `Português (Brasil)` gives `pt-BR`), or undefined for
354
- one naming no language, for code that reads tags.
361
+ resolves, and its host applies the preferences to its own tracks: `preferredSelection(kind, selections, preferences)`,
362
+ from `@banou/media-player/language`, names the option to select by the same rule, the audio selected standing for the
363
+ source's default, and imports nothing else of the player. `languageTag(pick)` from the same module gives a pick's BCP 47
364
+ tag (`jpn` gives `ja`, `Português (Brasil)` gives `pt-BR`), or undefined for one naming no language, for code that reads
365
+ tags.
355
366
 
356
367
  ### Labels in the viewer's language
357
368
 
@@ -364,7 +375,8 @@ host page shows, for another:
364
375
 
365
376
  They are shown in the closest language the player has: Latin American Spanish (`es-419`, for every `es-*`), Brazilian
366
377
  Portuguese (`pt-BR`, for every `pt-*`), French, German, Italian, Russian, Japanese, Korean, Simplified and Traditional
367
- Chinese (`zh-Hans`, `zh-Hant`), Turkish, Polish, Arabic and Hebrew, else English. The numbers in them are written as the tag writes them
378
+ Chinese (`zh-Hans`, `zh-Hant`), Turkish, Polish, Arabic, Hebrew, Indonesian, Vietnamese, Thai, Hindi, Ukrainian, Dutch,
379
+ Swedish, Czech, Greek, Romanian, Hungarian and Malay, else English. The numbers in them are written as the tag writes them
368
380
  (`es-AR` gives `0,5x`, `es-419` itself `0.5x`), and track languages are named in it, even when the labels are English
369
381
  (`en-DE` gives `0,5x`). A language's text is fetched the first time a player shows it, with FormatJS (`@formatjs/intl`),
370
382
  and the labels are English until it has arrived. A player given no `language`, or one it does not have, fetches neither.
@@ -0,0 +1,52 @@
1
+ //#region src/lib/locales/cs.json
2
+ var e = "Zvuk", t = "Zkopírováno", n = "Kopírovat", r = "Vypnuto", i = "Ztlumit", a = "Pozastavit", o = "Přehrát", s = "Kvalita", c = "Přehrát znovu", l = "Nastavení", u = "Titulky", d = "Nedostupné", f = "obnoveno", p = {
3
+ "(Default)": "(Normální)",
4
+ Audio: e,
5
+ Copied: t,
6
+ Copy: n,
7
+ "Copy the errors": "Kopírovat chyby",
8
+ "Could not switch. Try again.": "Přepnutí se nezdařilo. Zkuste to znovu.",
9
+ Disable: r,
10
+ "Exit full screen (f)": "Ukončit celou obrazovku (f)",
11
+ "Exit picture in picture": "Ukončit obraz v obraze",
12
+ "Full screen": "Celá obrazovka",
13
+ "Full screen (f)": "Celá obrazovka (f)",
14
+ Mute: i,
15
+ "Mute (m)": "Ztlumit (m)",
16
+ "Normalize volume": "Vyrovnávat hlasitost",
17
+ "Now click your browser's pop out button": "Teď klikněte na tlačítko obrazu v obraze ve svém prohlížeči",
18
+ Pause: a,
19
+ "Pause (k)": "Pozastavit (k)",
20
+ "Picture in picture": "Obraz v obraze",
21
+ Play: o,
22
+ "Play (k)": "Přehrát (k)",
23
+ "Playback errors ({count})": "Chyby přehrávání ({count})",
24
+ "Playback failed": "Přehrávání se nezdařilo",
25
+ "Playback speed": "Rychlost přehrávání",
26
+ "Put the subtitles in the picture": "Vložit titulky do obrazu",
27
+ "Put the subtitles in the video": "Vložit titulky do videa",
28
+ Quality: s,
29
+ "Reading the video file failed": "Videosoubor se nepodařilo přečíst",
30
+ Replay: c,
31
+ "Replay (k)": "Přehrát znovu (k)",
32
+ Settings: l,
33
+ "Skip Ending": "Přeskočit závěr",
34
+ "Skip Opening": "Přeskočit úvod",
35
+ Subtitles: u,
36
+ "Subtitles are in the picture": "Titulky jsou v obrazu",
37
+ "The MediaSource closed before a SourceBuffer could be created": "MediaSource se zavřel dřív, než bylo možné vytvořit SourceBuffer",
38
+ "The MediaSource never opened": "MediaSource se vůbec neotevřel",
39
+ "The browser rejected a media segment": "Prohlížeč odmítl segment média",
40
+ "The video codec in this file could not be identified": "Videokodek tohoto souboru se nepodařilo rozpoznat",
41
+ "This browser cannot play the codecs in this file: {codecs}": "Tento prohlížeč neumí přehrát kodeky tohoto souboru: {codecs}",
42
+ "This file has no subtitles": "Tento soubor nemá titulky",
43
+ "Track {number}": "Stopa {number}",
44
+ Unavailable: d,
45
+ "Unmute (m)": "Zapnout zvuk (m)",
46
+ "at {time}": "v {time}",
47
+ recovered: f,
48
+ "{rate}x": "{rate}x",
49
+ "{start} to {end}": "{start} až {end}"
50
+ };
51
+ //#endregion
52
+ export { e as Audio, t as Copied, n as Copy, r as Disable, i as Mute, a as Pause, o as Play, s as Quality, c as Replay, l as Settings, u as Subtitles, d as Unavailable, p as default, f as recovered };
@@ -0,0 +1,52 @@
1
+ //#region src/lib/locales/el.json
2
+ var e = "Ήχος", t = "Αντιγράφηκε", n = "Αντιγραφή", r = "Ανενεργοί", i = "Σίγαση", a = "Παύση", o = "Αναπαραγωγή", s = "Ποιότητα", c = "Επανάληψη", l = "Ρυθμίσεις", u = "Υπότιτλοι", d = "Μη διαθέσιμο", f = "αποκαταστάθηκε", p = {
3
+ "(Default)": "(Κανονική)",
4
+ Audio: e,
5
+ Copied: t,
6
+ Copy: n,
7
+ "Copy the errors": "Αντιγραφή σφαλμάτων",
8
+ "Could not switch. Try again.": "Η αλλαγή απέτυχε. Δοκιμάστε ξανά.",
9
+ Disable: r,
10
+ "Exit full screen (f)": "Έξοδος από πλήρη οθόνη (f)",
11
+ "Exit picture in picture": "Έξοδος από εικόνα σε εικόνα",
12
+ "Full screen": "Πλήρης οθόνη",
13
+ "Full screen (f)": "Πλήρης οθόνη (f)",
14
+ Mute: i,
15
+ "Mute (m)": "Σίγαση (m)",
16
+ "Normalize volume": "Εξισορρόπηση έντασης",
17
+ "Now click your browser's pop out button": "Τώρα πατήστε το κουμπί εικόνας σε εικόνα του προγράμματος περιήγησης",
18
+ Pause: a,
19
+ "Pause (k)": "Παύση (k)",
20
+ "Picture in picture": "Εικόνα σε εικόνα",
21
+ Play: o,
22
+ "Play (k)": "Αναπαραγωγή (k)",
23
+ "Playback errors ({count})": "Σφάλματα αναπαραγωγής ({count})",
24
+ "Playback failed": "Η αναπαραγωγή απέτυχε",
25
+ "Playback speed": "Ταχύτητα",
26
+ "Put the subtitles in the picture": "Ενσωμάτωση υποτίτλων στην εικόνα",
27
+ "Put the subtitles in the video": "Ενσωμάτωση υποτίτλων στο βίντεο",
28
+ Quality: s,
29
+ "Reading the video file failed": "Η ανάγνωση του αρχείου βίντεο απέτυχε",
30
+ Replay: c,
31
+ "Replay (k)": "Επανάληψη (k)",
32
+ Settings: l,
33
+ "Skip Ending": "Παράλειψη τίτλων τέλους",
34
+ "Skip Opening": "Παράλειψη εισαγωγής",
35
+ Subtitles: u,
36
+ "Subtitles are in the picture": "Οι υπότιτλοι είναι στην εικόνα",
37
+ "The MediaSource closed before a SourceBuffer could be created": "Το MediaSource έκλεισε πριν δημιουργηθεί SourceBuffer",
38
+ "The MediaSource never opened": "Το MediaSource δεν άνοιξε ποτέ",
39
+ "The browser rejected a media segment": "Το πρόγραμμα περιήγησης απέρριψε ένα τμήμα πολυμέσων",
40
+ "The video codec in this file could not be identified": "Ο κωδικοποιητής βίντεο αυτού του αρχείου δεν αναγνωρίστηκε",
41
+ "This browser cannot play the codecs in this file: {codecs}": "Αυτό το πρόγραμμα περιήγησης δεν μπορεί να αναπαράγει τους κωδικοποιητές αυτού του αρχείου: {codecs}",
42
+ "This file has no subtitles": "Αυτό το αρχείο δεν έχει υπότιτλους",
43
+ "Track {number}": "Κομμάτι {number}",
44
+ Unavailable: d,
45
+ "Unmute (m)": "Κατάργηση σίγασης (m)",
46
+ "at {time}": "στο {time}",
47
+ recovered: f,
48
+ "{rate}x": "{rate}x",
49
+ "{start} to {end}": "{start} έως {end}"
50
+ };
51
+ //#endregion
52
+ export { e as Audio, t as Copied, n as Copy, r as Disable, i as Mute, a as Pause, o as Play, s as Quality, c as Replay, l as Settings, u as Subtitles, d as Unavailable, p as default, f as recovered };
@@ -0,0 +1,52 @@
1
+ //#region src/lib/locales/hi.json
2
+ var e = "ऑडियो", t = "कॉपी हो गया", n = "कॉपी करें", r = "बंद", i = "म्यूट करें", a = "रोकें", o = "चलाएं", s = "क्वालिटी", c = "फिर से चलाएं", l = "सेटिंग", u = "सबटाइटल", d = "उपलब्ध नहीं", f = "ठीक हो गया", p = {
3
+ "(Default)": "(सामान्य)",
4
+ Audio: e,
5
+ Copied: t,
6
+ Copy: n,
7
+ "Copy the errors": "गड़बड़ियां कॉपी करें",
8
+ "Could not switch. Try again.": "बदला नहीं जा सका। फिर से कोशिश करें।",
9
+ Disable: r,
10
+ "Exit full screen (f)": "फ़ुल स्क्रीन से बाहर निकलें (f)",
11
+ "Exit picture in picture": "पिक्चर में पिक्चर से बाहर निकलें",
12
+ "Full screen": "फ़ुल स्क्रीन",
13
+ "Full screen (f)": "फ़ुल स्क्रीन (f)",
14
+ Mute: i,
15
+ "Mute (m)": "म्यूट करें (m)",
16
+ "Normalize volume": "आवाज़ एक जैसी रखें",
17
+ "Now click your browser's pop out button": "अब अपने ब्राउज़र का पिक्चर में पिक्चर बटन क्लिक करें",
18
+ Pause: a,
19
+ "Pause (k)": "रोकें (k)",
20
+ "Picture in picture": "पिक्चर में पिक्चर",
21
+ Play: o,
22
+ "Play (k)": "चलाएं (k)",
23
+ "Playback errors ({count})": "प्लेबैक की गड़बड़ियां ({count})",
24
+ "Playback failed": "प्लेबैक नहीं हो सका",
25
+ "Playback speed": "प्लेबैक स्पीड",
26
+ "Put the subtitles in the picture": "सबटाइटल तस्वीर में जोड़ें",
27
+ "Put the subtitles in the video": "सबटाइटल वीडियो में जोड़ें",
28
+ Quality: s,
29
+ "Reading the video file failed": "वीडियो फ़ाइल पढ़ी नहीं जा सकी",
30
+ Replay: c,
31
+ "Replay (k)": "फिर से चलाएं (k)",
32
+ Settings: l,
33
+ "Skip Ending": "एंडिंग स्किप करें",
34
+ "Skip Opening": "ओपनिंग स्किप करें",
35
+ Subtitles: u,
36
+ "Subtitles are in the picture": "सबटाइटल तस्वीर में हैं",
37
+ "The MediaSource closed before a SourceBuffer could be created": "SourceBuffer बनने से पहले MediaSource बंद हो गया",
38
+ "The MediaSource never opened": "MediaSource कभी नहीं खुला",
39
+ "The browser rejected a media segment": "ब्राउज़र ने एक मीडिया सेगमेंट अस्वीकार किया",
40
+ "The video codec in this file could not be identified": "इस फ़ाइल का वीडियो कोडेक पहचाना नहीं जा सका",
41
+ "This browser cannot play the codecs in this file: {codecs}": "यह ब्राउज़र इस फ़ाइल के कोडेक नहीं चला सकता: {codecs}",
42
+ "This file has no subtitles": "इस फ़ाइल में सबटाइटल नहीं हैं",
43
+ "Track {number}": "ट्रैक {number}",
44
+ Unavailable: d,
45
+ "Unmute (m)": "अनम्यूट करें (m)",
46
+ "at {time}": "{time} पर",
47
+ recovered: f,
48
+ "{rate}x": "{rate}x",
49
+ "{start} to {end}": "{start} से {end} तक"
50
+ };
51
+ //#endregion
52
+ export { e as Audio, t as Copied, n as Copy, r as Disable, i as Mute, a as Pause, o as Play, s as Quality, c as Replay, l as Settings, u as Subtitles, d as Unavailable, p as default, f as recovered };
@@ -0,0 +1,52 @@
1
+ //#region src/lib/locales/hu.json
2
+ var e = "Hang", t = "Másolva", n = "Másolás", r = "Ki", i = "Némítás", a = "Szünet", o = "Lejátszás", s = "Minőség", c = "Újrajátszás", l = "Beállítások", u = "Feliratok", d = "Nem érhető el", f = "helyreállt", p = {
3
+ "(Default)": "(Normál)",
4
+ Audio: e,
5
+ Copied: t,
6
+ Copy: n,
7
+ "Copy the errors": "Hibák másolása",
8
+ "Could not switch. Try again.": "Nem sikerült váltani. Próbáld újra.",
9
+ Disable: "Ki",
10
+ "Exit full screen (f)": "Kilépés a teljes képernyőből (f)",
11
+ "Exit picture in picture": "Kilépés a kép a képben módból",
12
+ "Full screen": "Teljes képernyő",
13
+ "Full screen (f)": "Teljes képernyő (f)",
14
+ Mute: i,
15
+ "Mute (m)": "Némítás (m)",
16
+ "Normalize volume": "Hangerő kiegyenlítése",
17
+ "Now click your browser's pop out button": "Most kattints a böngésző kép a képben gombjára",
18
+ Pause: a,
19
+ "Pause (k)": "Szünet (k)",
20
+ "Picture in picture": "Kép a képben",
21
+ Play: o,
22
+ "Play (k)": "Lejátszás (k)",
23
+ "Playback errors ({count})": "Lejátszási hibák ({count})",
24
+ "Playback failed": "A lejátszás nem sikerült",
25
+ "Playback speed": "Sebesség",
26
+ "Put the subtitles in the picture": "Feliratok beégetése a képbe",
27
+ "Put the subtitles in the video": "Feliratok beégetése a videóba",
28
+ Quality: s,
29
+ "Reading the video file failed": "Nem sikerült beolvasni a videofájlt",
30
+ Replay: c,
31
+ "Replay (k)": "Újrajátszás (k)",
32
+ Settings: l,
33
+ "Skip Ending": "Stáblista átugrása",
34
+ "Skip Opening": "Intro átugrása",
35
+ Subtitles: u,
36
+ "Subtitles are in the picture": "A feliratok a képben vannak",
37
+ "The MediaSource closed before a SourceBuffer could be created": "A MediaSource bezárult, mielőtt létrejöhetett volna egy SourceBuffer",
38
+ "The MediaSource never opened": "A MediaSource meg sem nyílt",
39
+ "The browser rejected a media segment": "A böngésző elutasított egy médiaszegmenst",
40
+ "The video codec in this file could not be identified": "Nem sikerült azonosítani a fájl videokodekjét",
41
+ "This browser cannot play the codecs in this file: {codecs}": "Ez a böngésző nem tudja lejátszani a fájl kodekjeit: {codecs}",
42
+ "This file has no subtitles": "Ennek a fájlnak nincs felirata",
43
+ "Track {number}": "{number}. sáv",
44
+ Unavailable: d,
45
+ "Unmute (m)": "Némítás feloldása (m)",
46
+ "at {time}": "pozíció: {time}",
47
+ recovered: f,
48
+ "{rate}x": "{rate}x",
49
+ "{start} to {end}": "{start} és {end} között"
50
+ };
51
+ //#endregion
52
+ export { e as Audio, t as Copied, n as Copy, r as Disable, i as Mute, a as Pause, o as Play, s as Quality, c as Replay, l as Settings, u as Subtitles, d as Unavailable, p as default, f as recovered };
@@ -0,0 +1,52 @@
1
+ //#region src/lib/locales/id.json
2
+ var e = "Audio", t = "Disalin", n = "Salin", r = "Nonaktif", i = "Bisukan", a = "Jeda", o = "Putar", s = "Kualitas", c = "Putar ulang", l = "Pengaturan", u = "Subtitel", d = "Tidak tersedia", f = "pulih", p = {
3
+ "(Default)": "(Normal)",
4
+ Audio: e,
5
+ Copied: t,
6
+ Copy: n,
7
+ "Copy the errors": "Salin kesalahan",
8
+ "Could not switch. Try again.": "Gagal beralih. Coba lagi.",
9
+ Disable: r,
10
+ "Exit full screen (f)": "Keluar dari layar penuh (f)",
11
+ "Exit picture in picture": "Keluar dari gambar dalam gambar",
12
+ "Full screen": "Layar penuh",
13
+ "Full screen (f)": "Layar penuh (f)",
14
+ Mute: i,
15
+ "Mute (m)": "Bisukan (m)",
16
+ "Normalize volume": "Samakan volume",
17
+ "Now click your browser's pop out button": "Sekarang klik tombol gambar dalam gambar di browser Anda",
18
+ Pause: a,
19
+ "Pause (k)": "Jeda (k)",
20
+ "Picture in picture": "Gambar dalam gambar",
21
+ Play: o,
22
+ "Play (k)": "Putar (k)",
23
+ "Playback errors ({count})": "Kesalahan pemutaran ({count})",
24
+ "Playback failed": "Pemutaran gagal",
25
+ "Playback speed": "Kecepatan putar",
26
+ "Put the subtitles in the picture": "Tanamkan subtitel ke gambar",
27
+ "Put the subtitles in the video": "Tanamkan subtitel ke video",
28
+ Quality: s,
29
+ "Reading the video file failed": "File video gagal dibaca",
30
+ Replay: c,
31
+ "Replay (k)": "Putar ulang (k)",
32
+ Settings: l,
33
+ "Skip Ending": "Lewati ending",
34
+ "Skip Opening": "Lewati intro",
35
+ Subtitles: u,
36
+ "Subtitles are in the picture": "Subtitel sudah ada di gambar",
37
+ "The MediaSource closed before a SourceBuffer could be created": "MediaSource tertutup sebelum SourceBuffer dapat dibuat",
38
+ "The MediaSource never opened": "MediaSource tidak pernah terbuka",
39
+ "The browser rejected a media segment": "Browser menolak segmen media",
40
+ "The video codec in this file could not be identified": "Codec video dalam file ini tidak dapat dikenali",
41
+ "This browser cannot play the codecs in this file: {codecs}": "Browser ini tidak dapat memutar codec dalam file ini: {codecs}",
42
+ "This file has no subtitles": "File ini tidak memiliki subtitel",
43
+ "Track {number}": "Trek {number}",
44
+ Unavailable: d,
45
+ "Unmute (m)": "Bunyikan (m)",
46
+ "at {time}": "pada {time}",
47
+ recovered: f,
48
+ "{rate}x": "{rate}x",
49
+ "{start} to {end}": "{start} sampai {end}"
50
+ };
51
+ //#endregion
52
+ export { e as Audio, t as Copied, n as Copy, r as Disable, i as Mute, a as Pause, o as Play, s as Quality, c as Replay, l as Settings, u as Subtitles, d as Unavailable, p as default, f as recovered };