Skip to content

[FEATURE REQUEST] Customize additional event dispatching for video #2

@tungs

Description

@tungs

Currently, video nodes still dispatches many events (canplay, etc), and timeweb only prevents some events (play and pause). Since video nodes that timeweb processes are always paused, and then seeked through to "play" them, this can create some unintended consequences. See tungs/timecut#55 for an example, where a canplay event is dispatched every single frame.

Video behavior may be further customizable by adding event listeners in addMediaNode and calling event.stopImmediatePropagation (or event.stopPropagation). That behavior is currently customized for play and pause events.

List of media events can be seen here. Of the list (abort, canplay, canplaythrough, durationchange, emptied, ended, error, loadeddata, loadedmetadata, loadstart, pause, play, playing, progress, ratechange, seeked, seeking, stalled, suspend, timeupdate, volumechange, waiting), only some of them are relevant. For each relevant one, it's likely that custom behavior needs to be defined and custom events need to be dispatched to restore intended behavior.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions