# VideoDecoder.on(string eventName, function callback)

Start from base library version 2.11.0. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support

Registers callback functions for listening to recorded events. When the corresponding event triggers, the callback function is executed

# parameter

# string eventName

Event name

eventName Legal value

value Introductions Minimum version
start Start the event. return {width, height}
stop End the event.
seek seek Complete the event.
bufferchange Buffer change event.
ended Decoding the end event.

# function callback

A callback function executed when an event is triggered