mirror of
https://github.com/videojs/video.js.git
synced 2026-11-23 10:03:18 +01:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
@videojs/spf/features/shift-text-timestamps
Source: src/playback/features/shift-text-timestamps.ts
shiftTextTimestampsFeature
Shifts text cues onto the playlist's zero-based timeline along with the audio and video, rebasing each cue by the
shift shiftTimestampsFeature establishes. Does nothing without a text feature, such as textTracksFeature.
Requires a writer of each track's startMediaTime from its container timestamps, such as shiftTimestampsFeature;
without one, cues wait for an origin nothing establishes and never appear.
Behaviors
None.
Config
Feature default is the value a feature's defaultConfig supplies. A behavior's own fallback for a key left unset is described under Doc.
| Key | Type | Feature default | Read by | Doc |
|---|---|---|---|---|
textMessagePipelines |
TextMessagePipelines<VTTCue> |
relocatingTextPipelines |
setupTextTrackActors | Ordered text step pipeline, mapped to the loader's messagePipelines. Named with the text domain prefix to mirror the v/a video/audioMessagePipelines composition-config keys. Defaults (in the loader) to resolveCues → dispatchCues. |
Composed by
Other functions and constants
| Name | Kind | Description | Source |
|---|---|---|---|
behaviors |
const | The behaviors the feature composes, in setup order. Listed under Behaviors. | src/playback/features/shift-text-timestamps.ts |
defaultConfig |
const | The config defaults the feature contributes. Its value: { textMessagePipelines: relocatingTextPipelines }. |
src/playback/features/shift-text-timestamps.ts |
initialState |
const | The state values the feature seeds. It seeds none ({}). |
src/playback/features/shift-text-timestamps.ts |
Types
| Name | Kind | Description | Source |
|---|---|---|---|
Behaviors |
type | The type of behaviors. |
src/playback/features/shift-text-timestamps.ts |
Config |
type | Every config key the behaviors read. Listed under Config. | src/playback/features/shift-text-timestamps.ts |
Context |
type | Every context key the behaviors declare. | src/playback/features/shift-text-timestamps.ts |
State |
type | Every state key the behaviors and external signals declare. | src/playback/features/shift-text-timestamps.ts |