A recorded clip (a robot's camera recording, an incident clip) with the kit's controls over a native video: play, a timeline with event markers, time, mute, speed, captions and full screen on a scrim; keys while focused; loading, buffering and unavailable states.
API reference
Generated from the types. Every part also takes className.
MediaPlayer
- labelrequired
stringWhat the clip is, for the player's name: "Patrol dog 7F3A, front camera, 14:02".- src
stringThe clip's URL. Leave it out while it is still being fetched (withloading).- poster
stringA still shown before playing.- duration
numberLength in seconds from the clip's record, so the time and the markers show before the file's metadata arrives.- startAt
numberWhere to start, in seconds: an incident clip opens at its event.- markers
MediaMarker[] = []- tracks
MediaTrack[] = []- loading
boolean = falseThe clip's URL is still being fetched.- unavailable
stringKnown before loading that it cannot play: "the robot has not uploaded it yet." Shown after "Clip unavailable:".- onRetry
() => voidCalled by the retry button. Without it, the button reloadssrc.- autoPlay
boolean = falseStarts muted on load, unless the person asked for reduced motion. Off by default: a clip waits for Play.- preload
"metadata" | "none" | "auto" = "metadata"How much to fetch before Play.metadata(default) gets the length;nonesaves data in a long list of clips.- labels
Partial<MediaPlayerLabels>