<video> 4.1 experimental XElement
<video> is an experimental element for playing online video resources in Lynx.
It supports playback controls through UIMethods and emits playback lifecycle events.
<video> is experimental and still in an early stage. Its API may change in future releases.
Contributions and feedback are welcome in lynx_video_element_spec.md.
Usage
Basic
Attributes
src
Android
iOS
Harmony
4.1
experimental
Video source URL. Only online network URLs are supported.
loop
Android
iOS
Harmony
4.1
experimental
Whether to loop playback.
volume
Android
iOS
Harmony
4.1
experimental
Playback volume from 0 to 1.
muted
Android
iOS
Harmony
4.1
experimental
Whether the video is muted.
speed
Android
iOS
Harmony
4.1
experimental
Playback speed from 0.1 to 2.0.
object-fit
Android
iOS
Harmony
4.1
experimental
Video scaling strategy.
mode
Android
iOS
Harmony
4.1
experimental
UIMethod execution mode.
timeupdate-interval
Android
iOS
Harmony
4.1
experimental
Minimum interval for bindtimeupdate dispatch, in seconds.
Events
Frontend can bind corresponding event callbacks to listen for runtime behaviors of the element, as shown below.
bindfirstframe
Android
iOS
Harmony
4.1
experimental
Fired when the first video frame has loaded.
bindplaying
Android
iOS
Harmony
4.1
experimental
Fired when video playback starts or resumes.
bindpaused
Android
iOS
Harmony
4.1
experimental
Fired when video playback pauses.
bindstopped
Android
iOS
Harmony
4.1
experimental
Fired when video playback is stopped by the stop UIMethod.
bindtimeupdate
Android
iOS
Harmony
4.1
experimental
Fired when the playback position updates.
bindended
Android
iOS
Harmony
4.1
experimental
Fired when video playback fully ends.
bindlooped
Android
iOS
Harmony
4.1
experimental
Fired at the end of each loop iteration.
binderror
Android
iOS
Harmony
4.1
experimental
Fired when a video playback error occurs.
bindbuffering
Android
iOS
Harmony
4.1
experimental
Fired while the video is buffering.
Methods
Frontend can invoke component methods via the SelectorQuery API.
Method callbacks may receive the following response fields:
play
Android
iOS
Harmony
4.1
experimental
Play the video.
pause
Android
iOS
Harmony
4.1
experimental
Pause video playback.
stop
Android
iOS
Harmony
4.1
experimental
Stop video playback.
seek
Android
iOS
Harmony
4.1
experimental
Seek to the target playback position.
Compatibility
LCD tables only load in the browser
