libaribhtml5 0.1.0 → 0.1.1
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.
|
@@ -6,6 +6,14 @@ export type BroadcastDocumentOptions = {
|
|
|
6
6
|
/** Inline bootstrap inserted at the start of head, including its script tag. */
|
|
7
7
|
bootstrap?: string;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Bootstrap a receiver-managed document before broadcaster deferred scripts run.
|
|
11
|
+
*
|
|
12
|
+
* A restored iframe can be parsed before the parent application's module has
|
|
13
|
+
* installed its host callback. Keep the receiver identity query usable during
|
|
14
|
+
* that short window and retry the full installation once the parent is ready.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createRuntimeBootstrap(scopePath?: string): string;
|
|
9
17
|
export declare function rewriteBroadcastObjectMarkup(source: string): string;
|
|
10
18
|
export declare function prefixBroadcastRootAttributes(source: string, basePath?: string, scopePath?: string): string;
|
|
11
19
|
export declare function prepareBroadcastStylesheet(source: string, options?: BroadcastDocumentOptions): string;
|
|
@@ -124,20 +124,24 @@ and therefore follow the Worker route. A font explicitly retained through
|
|
|
124
124
|
|
|
125
125
|
`src/runtime/fonts/arib-symbols.svg` is the auditable SVG Font source for the
|
|
126
126
|
television-symbol block `U+1F19B..U+1F1AC`, including `U+1F19E SQUARED FOUR K`
|
|
127
|
-
(`🆞`).
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
(`🆞`). `arib-enclosed-cjk.svg` covers the defined enclosed CJK television
|
|
128
|
+
symbols in `U+1F200..U+1F251`, including `🈑` and `🈔`. They are minimal
|
|
129
|
+
subsets of the OFL-licensed Noto Sans Symbols and Noto Sans CJK JP fonts. See
|
|
130
|
+
`src/runtime/fonts/NOTICE.md` and `src/runtime/fonts/OFL.txt`; no commercial
|
|
131
|
+
font outline is included.
|
|
130
132
|
|
|
131
133
|
Modern browsers no longer reliably render SVG Fonts, so the same script emits
|
|
132
|
-
|
|
133
|
-
for
|
|
134
|
-
`丸ゴシック`, `太丸ゴシック`, and `角ゴシック`. Ordinary Japanese
|
|
135
|
-
through the page's next fallback font. Dynamic DRCS and
|
|
136
|
-
SVG/WOFF fonts stay separate from
|
|
134
|
+
the corresponding WOFF files for runtime use. The runtime registers the sparse
|
|
135
|
+
fonts only for those code points under `ARIB Symbols` and the ARIB generic
|
|
136
|
+
family names `丸ゴシック`, `太丸ゴシック`, and `角ゴシック`. Ordinary Japanese
|
|
137
|
+
glyphs continue through the page's next fallback font. Dynamic DRCS and
|
|
138
|
+
broadcaster-delivered SVG/WOFF fonts stay separate from these static receiver
|
|
139
|
+
fonts.
|
|
137
140
|
|
|
138
141
|
Regenerate both assets with:
|
|
139
142
|
|
|
140
143
|
```sh
|
|
141
144
|
nix-shell -p python313Packages.fonttools --run \
|
|
142
|
-
'python scripts/build-arib-symbol-font.py /path/to/NotoSansSymbols.ttf
|
|
145
|
+
'python scripts/build-arib-symbol-font.py /path/to/NotoSansSymbols.ttf \
|
|
146
|
+
--cjk-source /path/to/NotoSansCJK-VF.otf.ttc'
|
|
143
147
|
```
|
|
@@ -22,10 +22,17 @@ caption ページを正しく表示するなら、1 番目または 2 番目が
|
|
|
22
22
|
<div id="normal-player">
|
|
23
23
|
<video id="video" autoplay muted playsinline></video>
|
|
24
24
|
</div>
|
|
25
|
-
<iframe id="broadcast"
|
|
25
|
+
<iframe id="broadcast"></iframe>
|
|
26
26
|
</div>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
この iframe は受信機が管理する同一 origin のコンテンツです。
|
|
30
|
+
`sandbox="allow-scripts allow-same-origin"` は指定しないでください。同一 origin の
|
|
31
|
+
script は sandbox 属性を除去できるため、ブラウザも security boundary にならないと
|
|
32
|
+
警告します。一方で `allow-same-origin` を外すと、host から受信機 API を導入できません。
|
|
33
|
+
受信機が信頼しないアプリケーションには、この in-process runtime ではなく別 origin の
|
|
34
|
+
integration が必要です。
|
|
35
|
+
|
|
29
36
|
`DomObjectMediaPlaneAdapter` に既存の video と、データ放送を終了した時に video を戻す
|
|
30
37
|
通常プレーヤー container を渡します。
|
|
31
38
|
|