Repository navigation
moq-wasm (JS) 0.7.0
-
Breaking: catalogs are now draft-ietf-moq-msf-02.
parseCatalogrejects a catalog whoseversionis notdraft-02, or whose namespace,dependsor required fields (§5.2.4.1) are invalid. Publishers and players must be updated together. -
Breaking:
MoqSession.subscribeGroupStarttakespriorityanddeliveryTimeoutMsin an options object instead of a positionalpriority:// before await session.subscribeGroupStart(ns, track, 60, 7) // after await session.subscribeGroupStart(ns, track, 60, { priority: 7 })
-
Breaking:
Mp4Broadcastis created on a session with
MoqSession.mp4Broadcast(namespace, index)instead of
new Mp4Broadcast(url, namespace, index), so it publishes with the
session's token and versions. It no longer hasclose(); close the session
instead.// before const broadcast = new Mp4Broadcast(url, namespace, index) await broadcast.close() // after const session = await MoqSession.connect(url, { token }) const broadcast = session.mp4Broadcast(namespace, index) session.close()
-
The stats of every started
LivePlayer, including the players of a
RemoteBroadcast's views, are sent withinit({ telemetry })without any
code in the page: each under the token of the player's session, so they
land in that session's app instead ofanon, with the player's namespace
astrackNamespaceand its source's video track name asmediaSource.
Settelemetry.playerStats: falseto stop them. A page that sends its
players' stats throughtelemetry.statsshould drop them there, or they
are sent twice. -
Fixed a
LivePlayertrack keeping the old Forward State when playback paused or resumed forwarding while its SUBSCRIBE was in flight: it stayed silent after a resume, or kept delivering during a review. -
moq-wasm/mediaexportsSeekAxis,StatusState,CatalogTrackRole,LogLevelandReviewFetchWindow, the typesLivePlayer,PlayerStatusandextractCatalogTracksrefer to. -
Fixed a video rendition of
publish()logging a warning for every frame after the session ended; it now stops at the first failure and reports it as the main video does. -
Fixed a source sometimes sending no video or audio to a subscriber when the relay asked for a track right after accepting its PUBLISH.
-
dependsof a parsed catalog track lists track names; arenderGroupnumber is resolved to the names of its tracks. -
The MSF catalog of a
MediaBroadcastnow lists abitratefor every audio and video track and aframeratefor every video track, estimated when the encoder does not set them (30 fps when the frame rate is not capped). -
A player subscribes its catalog at Subscriber Priority 0, its text tracks (the media timeline, captions,
addTextTrack) at 16 and its audio (addAudioTrackincluded) at 32; the catalog, the text tracks and anaddAudioTracktrack were at 128, the selected audio at 0. The media timeline also takes the player'sdeliveryTimeoutMsandgroupOrder. On a congested downlink the unsent streams of the catalog and the media timeline no longer keep a prioritized video from being sent.setVideoPriorityof 32 or less now puts a video level with or ahead of the audio, 16 the text tracks, 0 the catalog. -
MoqSession.subscribeCurrentGrouptakes the options ofsubscribeGroupStart(priority,deliveryTimeoutMs,groupOrder). -
On draft-18 sessions,
MoqSubscription.setForward,setPriorityandendBeforeGroupnow resolve once the relay has applied the update, so objects published right aftersetForward(true)are delivered. They reject if the relay refuses the update, does not answer within 10 s, or the subscription ends first. -
addSourcetakescmaf: trueto also send the video and its renditions as
CMAF in<track>_cmaf, which aLivePlayerplays after
setPackaging('cmaf'). The audio stays LOC only, so CMAF playback is video
only. -
MoqSubscribeOptions,LivePlayerOptionsandRemoteBroadcastOptionstake
groupOrder('ascending'by default): the Group Order a SUBSCRIBE
carries. With'descending'a relay sends the newest group first when a
congested link holds more than one, so live playback jumps ahead instead
of falling behind. -
LivePlayer.setVideoPrioritycalled while the first video SUBSCRIBE is still unanswered is no longer dropped: the track kept its previous Subscriber Priority until the next change. -
Added
deliveryTimeoutMstoMoqSubscribeOptions,LivePlayerOptionsandRemoteBroadcastOptions: the DELIVERY TIMEOUT a SUBSCRIBE carries. A relay that honours it gives up on an object that many milliseconds after receiving it and resets the stream of its group, so a congested downlink carries recent media instead of a growing backlog. A player applies it to its selected video and audio track, not to tracks added withaddAudioTrack, and throws aRangeErrorunless it is an integer from 1 to 4294967295. Without it every object is delivered, as before. -
buildMsfCatalogJson(tracks, initDataList?)and itsMsfTrack/MsfInitDatatypes are exported frommoq-wasm/media, for a page that publishes its own media tracks withpublishTrackand needs an MSF catalogLivePlayercan read. -
A draft-14 server whose SERVER_SETUP carries a parameter that is not UTF-8 no longer crashes the page's wasm module.
-
Fixed: after a GOAWAY, the SDK no longer subscribes on the new relay to a track whose publisher ended it with PUBLISH_DONE.
-
Fixed: when the relay a GOAWAY names rejects a published track, the track now ends with an unsubscribe once the previous relay closes, instead of staying with no subscriber and failing every write.
-
Fixed: a subscription moved by GOAWAY from a draft-14 relay to a draft-18 relay no longer fails as a malformed track when it receives a datagram after a subgroup stream.
-
A session no longer queues an unlimited number of control messages while the application handles them slower than they arrive.
-
setVideo,setAudioandsetVideoEncodingcalled while asetVideo(false)orsetAudio(false)is still pending now apply after it. Before, an encoding change started an encoder for the removed video, and a track set during the removal was dropped fromsource.streamand not encoded again after an unmute. -
An
addSourcestill pending whenclose()is called now rejects with "the broadcast is closed" and stops the devices it captured, instead of resolving with a source that kept publishing on the closed broadcast. -
session.publishTrack(namespace, track, { datagram: true })sends each object of the track in its own datagram instead of on a subgroup stream: a lost object is not resent and never delays the next one. Keep an object under about 1 KB; one larger than the path allows is dropped. It rejects for a track already written to on streams. -
A FETCH response that arrives after its FETCH was cancelled, as when a
viewer leaves right after it joins, no longer logs an error, and the
response stream is stopped instead of being left open. -
A session now closes with PROTOCOL_VIOLATION when the peer sends a datagram or unidirectional stream of an unknown type, or a malformed one, as draft-14 and draft-18 require.
-
The automatic quality of
LivePlayerno longer waits about 13 s to step up when its container grows right after the video is subscribed, or when the catalog adds a rendition above the one playing. -
A live LOC video no longer freezes when the page moves the player's
container to another element. The browser paused it, and it stayed paused
until the next resubscribe. -
A seek right after
LivePlayerswitches video rendition no longer fails
withDecoding error.. The player passed the rest of the group before the
switch to the decoder. -
parseCatalogthrows on a delta update;RemoteBroadcastignores a catalogparseCatalogrejects, andLivePlayerreports a catalog error. -
Fixed: on a draft-14 session, a request whose control message is longer than
65,535 bytes, for example one with a very long authorization token or track
name, now fails instead of being sent with a truncated length, which broke
the session. -
On draft-18 sessions, an object, a FETCH object or its properties declared longer than 16 MiB is refused, as on draft-14, instead of being buffered until all of it arrives.
-
addSource()takes acodecper rendition, the source'sencoding.codecby default, so a source can publish H.265 video with an H.264 rendition for viewers that cannot decode H.265. A rendition the browser cannot encode is reported throughonErrorand left out of the catalog.await local.addSource('camera', { video: true, encoding: { codec: 'h265' }, renditions: [{ name: 'avc', label: '720p', width: 1280, height: 720, bitrate: 2_000_000, codec: 'h264' }] })
-
LivePlayerpicks video only from the tracks the browser can decode, and of renditions with the same size in one switching set it keeps the one with the lowest bitrate. Players of 0.6.0 and earlier do not check the codec and may pick a rendition they cannot decode. -
LivePlayerswitching to a rendition in another codec, such as from H.265 to H.264, now reconfigures its decoder at the rendition's first keyframe instead of decoding it with the previous codec. -
LivePlayer.addAudioTrack(name, listener)plays another live LOC audio
track of the catalog next to the selected one, on the same clock. It
starts silent;onFirstScheduled(dueMs)tells when it has caught up, and
the returnedAddedAudioTracksets its volume and closes it. -
LivePlayer.addTextTrack(name, listener)delivers the objects of a text
track, such as captions, when the live sound captured with them plays. -
LivePlayer.setLateSamples('drop' | 'move-clock')chooses what a sample
that arrives after its time does, next tosetBufferPolicyand
setCatchUp. -
LivePlayer.setVolume(volume, timeConstantSeconds)takes the time
constant the live sound approaches the volume with. -
LivePlayer.stats()addsaudioDroppedLateSamples,
videoDroppedLateFrames,audioCaptureMicrosandaudioObjects. -
RemoteBroadcastOptions.keepLiveWhileReviewing(also an option of
watchBroadcasts) keeps the live subscriptions of every view's player
forwarding behind a review, asLivePlayerOptions.keepLiveWhileReviewing
does, so going live shows the live picture at once. -
LivePlayerasks for a new group once when it switches rendition, returns
to live or loses its group, instead of repeating the request every 2.2
seconds. Deploy a relay without the 2-second NEW_GROUP_REQUEST interval
before upgrading the SDK: an older relay can hold the request back, and the
picture then waits for the next keyframe. -
MoqSession.subscribeGroupStart()sends its joining FETCH after the
SUBSCRIBE_OK instead of right behind the SUBSCRIBE, so it no longer sends a
FETCH it then cancels. A join that reads the current group takes one more
round trip. -
A published video starts a new group on a viewer's request
(NEW_GROUP_REQUEST) only once its current group is 2 seconds old or holds
60 objects. A request that arrives earlier is answered when the group
reaches either. -
Stepping a paused review no longer waits for a FETCH each time:
LivePlayerkeeps each group a seek landed on, and the two groups ahead of
the last move, until it goes live, the tracks change or it stops. -
LivePlayer.state.seek.shownSecondsis the capture time of the review
frame on screen, and undefined while the frame of a seek is being fetched. -
Fixed: going live from a LOC review showed, for a moment, the frame the
live picture held when it was paused. -
Fixed: a live LOC picture without sound waited 400 ms after a pause before
it showed a frame again. -
When a source's publish queue overflows and drops video, the source is asked for a keyframe, so viewers get video back as soon as the queue drains instead of at the next periodic keyframe, up to 30 seconds later.
-
LivePlayerasks the publisher for a new group (NEW_GROUP_REQUEST) when its video decoder fails or loses its reference frames, so the picture comes back without waiting for the next keyframe. -
addSourcetakesencoding.codec: 'h265'(Main Profile), or anhvc1.*/hev1.*codec string. H.265 needs a browser with a hardware encoder for it, such as Chrome on a Mac. -
LivePlayerplays an H.265 track where the browser has a hardware decoder for it; other browsers show no picture.