@byomakase/omakase-react-components 1.3.0 → 1.4.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.
- package/README.md +37 -2
- package/dist/index.cjs.js +94 -72
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.d.ts +19 -16
- package/dist/index.es.js +4365 -3820
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +94 -72
- package/dist/index.umd.js.map +1 -1
- package/dist/omakase-react-components.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -124,6 +124,7 @@ The following properties are present:
|
|
|
124
124
|
- `segmentationLanes`: A reference to the state holding a list of [MarkerLanes](https://api.player.byomakase.org/classes/MarkerLane.html) used for media segmentation.
|
|
125
125
|
- `source`: A reference to one of the segmentation lanes that is currently considered active. ControlsToolbar will only interact with markers in the source.
|
|
126
126
|
- `setSegmentationLanes`: A react state setter for segmentation lanes
|
|
127
|
+
- `setSelectedMarker`: A react state setter for selected marker
|
|
127
128
|
- `setSource`: A react state setter for source
|
|
128
129
|
- `enableHotKeys`: A boolean used to enable hot keys. Defaults to true.
|
|
129
130
|
- `constants`: An object containing styles for Omakase timeline elements that ControlsToolbar can create.
|
|
@@ -224,13 +225,13 @@ The following properties are present:
|
|
|
224
225
|
|
|
225
226
|
The hot keys are the same as OmakasePlayerComponent
|
|
226
227
|
|
|
227
|
-
##
|
|
228
|
+
## OmakaseTimeRangeSelectorComponent
|
|
228
229
|
|
|
229
230
|
A wrapper around HTML component used to navigate infinite timelines modified for TAMS.
|
|
230
231
|
|
|
231
232
|
```js
|
|
232
233
|
return (
|
|
233
|
-
<
|
|
234
|
+
<OmakaseTimeRangeSelectorComponent
|
|
234
235
|
numberOfSegments={6}
|
|
235
236
|
maxSliderRange={1800}
|
|
236
237
|
segmentSize={600}
|
|
@@ -252,6 +253,40 @@ The following properties are present:
|
|
|
252
253
|
- `maxTimeRange`: A timerange string representing the range slider can navigate in
|
|
253
254
|
- `onCheckmarkClickCallback`: A function called when new timerange is selected by moving and/or stretching the slider
|
|
254
255
|
|
|
256
|
+
## CSS Custom Properties
|
|
257
|
+
|
|
258
|
+
### OmakasePlayerTimelineControlsToolbar
|
|
259
|
+
|
|
260
|
+
All visual aspects can be customized by overriding these CSS custom properties on `:root` or any ancestor element:
|
|
261
|
+
|
|
262
|
+
| Property | Default | Description |
|
|
263
|
+
| -------------------------------------------------- | --------- | -------------------------------- |
|
|
264
|
+
| `--omakase-toolbar-control-panel-background-color` | `#3a3d4b` | Toolbar control panel background |
|
|
265
|
+
| `--omakase-toolbar-icon-color` | `#cacfea` | Toolbar icon color |
|
|
266
|
+
|
|
267
|
+
### OmakaseTimeRangeSelectorComponent
|
|
268
|
+
|
|
269
|
+
`OmakaseTimeRangeSelectorComponent` renders an `OmakaseTimeRangeSelector` internally. All of its visual aspects can be customized via the following CSS custom properties:
|
|
270
|
+
|
|
271
|
+
| Property | Default | Description |
|
|
272
|
+
| ---------------------------------------------------------------------- | --------- | ----------------------------------------------------- |
|
|
273
|
+
| `--omakase-time-range-selector-width` | `700px` | Width of the component |
|
|
274
|
+
| `--omakase-time-range-selector-height` | `32px` | Base height — all other heights are derived from this |
|
|
275
|
+
| `--omakase-time-range-selector-font-size` | `13px` | Font size for labels and duration display |
|
|
276
|
+
| `--omakase-time-range-selector-segment-marker-background-color` | `#2E313D` | Segment marker bar background |
|
|
277
|
+
| `--omakase-time-range-selector-segment-marker-border-color` | `#655372` | Segment marker bar border |
|
|
278
|
+
| `--omakase-time-range-selector-segment-tick-border-color` | `#655372` | Segment tick mark border |
|
|
279
|
+
| `--omakase-time-range-selector-segment-label-font-color` | `inherit` | Segment timeline label color |
|
|
280
|
+
| `--omakase-time-range-selector-range-selector-background-color` | `#662D91` | Draggable range selector background |
|
|
281
|
+
| `--omakase-time-range-selector-range-selector-handle-background-color` | `#662D91` | Resize handle background |
|
|
282
|
+
| `--omakase-time-range-selector-range-selector-duration-font-color` | `#ffffff` | Duration label text color |
|
|
283
|
+
| `--omakase-time-range-selector-confirm-button-background-color` | `#424850` | Confirm (checkmark) button circle background |
|
|
284
|
+
| `--omakase-time-range-selector-confirm-button-color` | `#00E9A3` | Confirm (checkmark) icon color |
|
|
285
|
+
| `--omakase-time-range-selector-cancel-button-background-color` | `#424850` | Cancel (×) button circle background |
|
|
286
|
+
| `--omakase-time-range-selector-cancel-button-color` | `#F03838` | Cancel (×) icon color |
|
|
287
|
+
|
|
288
|
+
The marker bar height is `(height - 2px) × 2/3`, the tick height is `(height - 2px) / 3`, and the handle height equals `height` — so changing `--omakase-time-range-selector-height` scales all three proportionally.
|
|
289
|
+
|
|
255
290
|
## Tips
|
|
256
291
|
|
|
257
292
|
- Be mindful about props changes to Omakase components as every rerender will force either a timeline rerender (potentially expensive if timeline is rich) or a player reload (playback will stop and commence from the start)
|