@fugood/bricks-ctor 2.25.0-beta.58 → 2.25.0-beta.60

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": "@fugood/bricks-ctor",
3
- "version": "2.25.0-beta.58",
3
+ "version": "2.25.0-beta.60",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
@@ -11,7 +11,7 @@
11
11
  "@babel/parser": "7.28.5",
12
12
  "@babel/traverse": "7.28.5",
13
13
  "@babel/types": "7.28.5",
14
- "@fugood/bricks-cli": "^2.25.0-beta.58",
14
+ "@fugood/bricks-cli": "^2.25.0-beta.60",
15
15
  "@huggingface/gguf": "^0.3.2",
16
16
  "@iarna/toml": "^3.0.0",
17
17
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -29,5 +29,5 @@
29
29
  "peerDependencies": {
30
30
  "oxfmt": "^0.36.0"
31
31
  },
32
- "gitHead": "355da5754f1136c10e073460af4727dae94f7e30"
32
+ "gitHead": "c0dd2ea071f45382808ad55acfc9837217d683ca"
33
33
  }
@@ -31,6 +31,7 @@ const mediaListGenerator: GeneratorMediaFlow = {
31
31
  description: '',
32
32
  property: {
33
33
  boxId: 'promo-box-id',
34
+ passcode: 'box-read-only-passcode',
34
35
  },
35
36
  outlets: {
36
37
  files: () => promoFilesData, // Array of file objects
@@ -40,6 +41,12 @@ const mediaListGenerator: GeneratorMediaFlow = {
40
41
  }
41
42
  ```
42
43
 
44
+ When hand-writing `GENERATOR_MEDIA_FLOW`, do not use a bare `boxId`. The editor
45
+ flow creates the required authorization, but manual config must include either
46
+ `property.passcode` from a Media Box passcode or `property.accessToken`.
47
+ Without one, devices cannot read the box and the generator will report an
48
+ authorization error.
49
+
43
50
  ## Property Kinds for Media
44
51
 
45
52
  Link Data properties to Media Flow for asset selection:
@@ -63,7 +63,13 @@ Default property:
63
63
  "muted": false,
64
64
  "progressUpdateInterval": 1000,
65
65
  "replayTimeout": 500,
66
- "renderMode": "auto"
66
+ "renderMode": "auto",
67
+ "showSubtitles": true,
68
+ "subtitleColor": "#FFFFFF",
69
+ "subtitleBackgroundColor": "rgba(0, 0, 0, 0.6)",
70
+ "subtitleFontSize": 2,
71
+ "subtitlePosition": "bottom",
72
+ "subtitleTextAlign": "center"
67
73
  }
68
74
  */
69
75
  property?: BrickBasicProperty & {
@@ -106,6 +112,57 @@ Default property:
106
112
  replayTimeout?: number | DataLink
107
113
  /* Use what view type for render video (Auto / Texture or Surface). Notice: Although using surface has better performance, it also affects the Animation & Standby Transition used by itself */
108
114
  renderMode?: 'auto' | 'texture' | 'surface' | DataLink
115
+ /* The subtitle file path list or single path (SRT/WebVTT), index-matched to the video path. Used when no inline subtitles are set for that video. */
116
+ subtitlePath?:
117
+ | string
118
+ | DataLink
119
+ | DataLink
120
+ | {
121
+ url?: string | DataLink
122
+ }
123
+ | Array<
124
+ | DataLink
125
+ | {
126
+ url?: string | DataLink
127
+ }
128
+ | string
129
+ | DataLink
130
+ | DataLink
131
+ >
132
+ | DataLink
133
+ | DataLink
134
+ /* Inline subtitles per video, index-matched to the video path: each entry holds a `cues` list of { start, end, text } (start/end in seconds). Takes precedence over the subtitle file for that video. */
135
+ subtitles?:
136
+ | Array<
137
+ | DataLink
138
+ | {
139
+ cues?:
140
+ | Array<
141
+ | DataLink
142
+ | {
143
+ start?: number | DataLink
144
+ end?: number | DataLink
145
+ text?: string | DataLink
146
+ }
147
+ >
148
+ | DataLink
149
+ }
150
+ >
151
+ | DataLink
152
+ /* Render the subtitle overlay. Turn off to only trigger subtitle events without rendering text */
153
+ showSubtitles?: boolean | DataLink
154
+ /* Subtitle text color */
155
+ subtitleColor?: string | DataLink
156
+ /* Subtitle background color */
157
+ subtitleBackgroundColor?: string | DataLink
158
+ /* Subtitle font size, in grid units (same as Brick Text) */
159
+ subtitleFontSize?: number | DataLink
160
+ /* Subtitle font family */
161
+ subtitleFontFamily?: string | DataLink
162
+ /* Subtitle vertical position */
163
+ subtitlePosition?: 'bottom' | 'top' | DataLink
164
+ /* Subtitle text alignment */
165
+ subtitleTextAlign?: 'left' | 'center' | 'right' | DataLink
109
166
  }
110
167
  events?: BrickBasicEvents & {
111
168
  /* Event of the brick press */
@@ -130,6 +187,14 @@ Default property:
130
187
  onError?: Array<EventAction>
131
188
  /* Event of the video progress interval */
132
189
  onProgress?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['onProgress']>>
190
+ /* Event when a subtitle cue starts (appears) during playback */
191
+ subtitleCueEnter?: Array<
192
+ EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueEnter']>
193
+ >
194
+ /* Event when a subtitle cue ends (disappears) during playback */
195
+ subtitleCueExit?: Array<
196
+ EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueExit']>
197
+ >
133
198
  }
134
199
  outlets?: {
135
200
  /* Brick is pressing */
@@ -149,6 +214,8 @@ Default property:
149
214
  onLoad?: AnimationOrGetter
150
215
  onError?: AnimationOrGetter
151
216
  onProgress?: AnimationOrGetter
217
+ subtitleCueEnter?: AnimationOrGetter
218
+ subtitleCueExit?: AnimationOrGetter
152
219
  }
153
220
  }
154
221
 
@@ -16,6 +16,13 @@ export const templateEventPropsMap = {
16
16
  Video: {
17
17
  nextVideo: { BRICK_VIDEO_NEXT_INDEX: 'number' },
18
18
  onProgress: { BRICK_VIDEO_CURRENT_TIME: 'number', BRICK_VIDEO_PLAYABLE_DURATION: 'number' },
19
+ subtitleCueEnter: {
20
+ BRICK_VIDEO_SUBTITLE_TEXT: 'string',
21
+ BRICK_VIDEO_SUBTITLE_INDEX: 'number',
22
+ BRICK_VIDEO_SUBTITLE_START: 'number',
23
+ BRICK_VIDEO_SUBTITLE_END: 'number',
24
+ },
25
+ subtitleCueExit: { BRICK_VIDEO_SUBTITLE_TEXT: 'string', BRICK_VIDEO_SUBTITLE_INDEX: 'number' },
19
26
  },
20
27
  VideoStreaming: {},
21
28
  Qrcode: {},