This is deliberately not part of the media-card surface. WebRTC media is
auto-consumed — the SDK subscribes for you, and getRemoteVideoStreams /
getAudioGridComponents hand you what already arrived. HLS and WHEP are the
opposite: nothing is consumed until you ask, because each one opens a
connection the room did not ask for and would otherwise pay for.
So the API here is imperative — attachPlayback / detachPlayback — rather
than a reactive getter. Mixing these into the media cards would mean every
room silently opened an HLS or WHEP connection whether or not anything
rendered it.
When to reach for which:
latency
cost per viewer
use it for
WebRTC (auto)
sub-second
an SFU consumer
anyone who takes part
WHEP
sub-second
an SFU consumer
standards-based egress to non-SDK players
HLS
seconds
a CDN request
audiences too large to fan out over the SFU
A large passive audience on HLS is the reason this exists: it moves the
expensive part — media fan-out — off the SFU.
Explicit playback: HLS and WHEP.
This is deliberately not part of the media-card surface. WebRTC media is auto-consumed — the SDK subscribes for you, and
getRemoteVideoStreams/getAudioGridComponentshand you what already arrived. HLS and WHEP are the opposite: nothing is consumed until you ask, because each one opens a connection the room did not ask for and would otherwise pay for.So the API here is imperative —
attachPlayback/detachPlayback— rather than a reactive getter. Mixing these into the media cards would mean every room silently opened an HLS or WHEP connection whether or not anything rendered it.When to reach for which:
A large passive audience on HLS is the reason this exists: it moves the expensive part — media fan-out — off the SFU.