Repository navigation
-
Breaking: a live seek bar now spans only the window the relay can replay, and its left end shows how far that window reaches behind live; the time since the broadcast started is no longer shown while live.
LivePlayer.elapsedMsAtreturnsundefinedwhile live, andSeekAxis.broadcastStartSecondsis set only for a broadcast that is not live. To label a live position, use how far it is behindSeekAxis.liveEdgeSeconds. -
Breaking: the chat track's
eventTypeis nowio.skyway.research.moqt.chat.v1(wascom.skyway.chat.v1). Accept both names to read the chat of publishers on 0.8.0 and earlier. -
Breaking:
parseCatalog,new Mp4Index,Mp4Index.video()andMp4Index.annexBVideoSamplethrow anErrorinstead of a string, andparseCatalogthrows for a catalog without atracksarray (draft-ietf-moq-msf-02 §5.1.4).LivePlayerandRemoteBroadcastignore such a catalog and keep their current tracks. -
<moq-player>, a custom element inmoq-wasm/element, plays a broadcast:<moq-player src="…" namespace="room/alice" controls>.- It connects while it is in the page, reconnects when
src,namespaceortokenchange, and closes its session when removed.tokenis an attribute, or a property holding a function that returns a fresh token. - Set its
sessionproperty to play on a session the page opened (it never closes that session),tracksto choose the tracks, and thepackagingattribute (locorcmaf). playerreturns itsLivePlayer; it firesstatechangeandliveframe, anderrorwhen connecting fails.- Import
moq-wasm/media/player.css, and withcontrolsalsomoq-wasm/media/controls.css.
- It connects while it is in the page, reconnects when
-
PlayerControls.dispose()removes the controls from their container and stops listening to the page's keys. -
LivePlayer.setAudioVideoSync('video-ahead')presents live LOC video without waiting for the audio output, so the sound follows the picture by the output latency plus 20 ms. It is for games and remote control, where the picture has to answer the input.'synced', the default, presents a frame as its sound is heard.AudioVideoSyncis exported frommoq-wasm/media. -
LivePlayerOptions.callbacksand each ofonStateChange,onLiveFrameandonLogare optional:new LivePlayer({ container })is enough. Code that calls the members of aLivePlayerCallbacksvalue itself now needs?.. -
PhoneCall(moq-wasm/media) joins a phone call that the SIP gateway placed or answered for the page's app server:PhoneCall.join(session, { call, local, audio })publishes the microphone and plays the phone,listenreportsdialing,ringing,answeredandendedwith the reason,sendDtmfsends DTMF digits, andhangUpends the call. -
Bots in a room:
botNamespace(room, botType)returns[...room, 'bots', botType], andbotTypeOf(room, namespace)returns<type>for exactly that namespace, otherwiseundefined.WatchBroadcastsOptions.onBotChange(botType, present)reports bots announced and withdrawn under the watched prefix, independently offilterand playback. Follow bots on this watch instead of a secondwatchNamespaces, which a relay rejects withNAMESPACE_PREFIX_OVERLAP.subscribeTranscript(session, room, onRecords)follows the transcriber'stranscripttrack and callsonRecordswith everyTranscriptRecord({ startedAtMs, speaker, text, live }) each time they change. It rejects withRequestErrorwhile the transcriber is absent; the returnedTranscriptSubscriptionhasdoneandclose().
import { botTypeOf, subscribeTranscript, watchBroadcasts } from 'moq-wasm/media' const room = ['app-id', 'room-1'] let transcript const watch = await watchBroadcasts(session, room, { filter: (namespace) => botTypeOf(room, namespace) === undefined, onBotChange: (botType, present) => { if (botType !== 'transcriber') return transcript?.then((subscription) => subscription.close()).catch(() => {}) transcript = present ? subscribeTranscript(session, room, renderTranscript) : undefined transcript?.catch(console.error) }, onAdd: (broadcast) => addParticipant(broadcast), onRemove: (broadcast) => removeParticipant(broadcast) })
-
createBroadcasttakeseventTimelines: each{ name, eventType, priority }is listed in the catalog as a JSON event timeline; write it withsession.publishTrack, passing the samepriority. -
AudioPublishStats(fromLocalSource.stats()) hasinput: theAudioDatathe encoder read per second, the latest sample rate and channel count, and the minimum and mean-power levels over the last second, in dBov. Withinit({ telemetry }), each source that publishes audio sends them as theclient.publisher.audio_*metrics, and a source logsmute,unmuteandendedof its audio track. -
With
init({ telemetry }), a failedMoqSession.connectsends asession connect failedwarning with the error of each transport tried or the server's rejection of the SETUP, and a wasm module that fails to load (such as a stale cached page after a redeploy) sends awasm module failed to loaderror. -
CMAF tracks published with
cmaf: truecarry the same clock as their LOC tracks (the capture time in Unix microseconds), and the media timeline lists that time as its presentation time (draft-ietf-moq-msf-02 §7.1.1). Players before 0.9.0 show a wrong elapsed time for such broadcasts. -
A callback or listener the page passes to
moq-wasm/mediathat throws no longer breaks the SDK: the exception is reported withreportErrorand the SDK carries on as if the callback had returned.watchBroadcastsalso keeps watching when creating or disposing of aRemoteBroadcastfails, callsfilteron announcements only (a withdrawn played namespace is always removed), and calls nothing afterBroadcastWatch.close(). -
LivePlayer.setBufferPolicy: while audio plays, amaximumMsbelow what the audio output needs is raised to it, so the sound no longer drops out and the picture no longer stutters from 10 s into playback. -
MoqSession.connectrejects when the relay accepts the connection but sends no SERVER_SETUP within 30 s, instead of waiting forever. -
session.publishTrackwithdatagram: trueaccepts a track registered again on the same session and keeps sending it in datagrams; withoutdatagram, it rejects for a track that has sent objects in datagrams. -
A track published with
retentionMsno longer serves to FETCH, or keeps in memory, objects older thanretentionMswhen it has not been written to since. -
A SUBSCRIBE to a track a broadcast removed (such as when its camera track ends) is refused with
TRACK_DOES_NOT_EXISTuntil the track is published again. -
A source's renditions no longer grow memory without bound while the relay does not take their objects: beyond about 300 queued frames, rendition frames are dropped up to the next keyframe.
-
Fixed:
- a video muted and unmuted in quick succession sometimes never being published again;
- a subscriber missing objects written while an earlier
TrackWriter.writeorwriteGroupto the same track had not resolved; - a subscription's
donenot resolving when PUBLISH_DONE arrives right after SUBSCRIBE_OK; - on draft-18,
publishfailing with "request stream reset" when the peer accepted and at once unsubscribed; - an unhandled
InvalidStateErrorwhen CMAF playback was closed during an append; Mp4IndexandMp4Broadcastgiving enormous sample times for MP4 files with negative composition offsets;- CMAF video samples overlapping or leaving a one-tick gap, and media publishing stopping when a video frame or keyframe repeated the previous timestamp.
-
GOAWAY migration, protocol limits and malformed input: after a GOAWAY a subscription no longer drops or duplicates a group, and a session closed during the migration stays closed (#2073, #2074); a request with more than 32 namespace fields, an empty field on draft-18, or a Full Track Name over 4,096 bytes fails alone instead of closing the session (#1740, #1812); NEW_GROUP_REQUEST throttling and Prior Group ID Gap are sent correctly (#2071, #2072); and stream and draft-14 parsing edge cases are handled (#1707, #1738, #1791).