Event unsubscription
Name of event without the 'on' prefix (ex: 'log' to 'onLog' event declared)
Event subscription
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Event subscription only one time, once time fired it's automatically unsubscribe
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Event fire on new sample Media.Sample
ProtectedparseChildren class must implement the parsing logic, and returns how many bytes have to be kept.
the binary to parse
RTSReader to unserialize RTS container
Format: MEDIA PACKET -- (7bit packetSize)[7bit trackId+1 << 2 | type](7bit firstTime)[7bit duration << 2 | hasCompositionOffset<<1 | isKeyFrame](7bit compositionOffset) [frame] -- DATA PACKET -- (7bit packetSize)[7bit trackId+1 << 2 | type][7bit time] [frame] -- INIT TRACKS -- (7bit packetSize)[7bit 0 << 2 | 3] (7bit audioTrackId+1)(7bit videoTrackId+1)-- METADATA -- (7bit packetSize)[7bit 0 << 2 | 0] [meta] --
packetSize => optional packet size trackId => track id type = [0, 1, 2, 3] = [Data, Audio, Video, Reserved] firstTime => timestamp only the first time per track after a INIT TRACKS signal time => data time compositionOffset => composition offset frame => binary frame payload meta => JSON metadata payload