179 lines
11 KiB
Markdown
179 lines
11 KiB
Markdown
# Media Status
|
|
|
|
Each share stage projects its current publication, delivery and player state.
|
|
The page connection and each operation keep their own status. The loading and
|
|
waiting catalogue is at `/__status-preview`.
|
|
|
|
When supplementary guidance is needed, controls, names and details share `Tooltip`, following the
|
|
[visual language](./visual-language.md). Its native Popover top layer escapes scrolling
|
|
containers, with viewport-relative placement. Hover, keyboard focus and touch
|
|
hold share one visibility owner; Escape dismisses even a mouse-only hint.
|
|
`/__tooltip-preview` shows the catalogue. [Playback ownership](#playback-ownership)
|
|
assigns playback actions, and [screen audio](./media-quality.md#screen-audio)
|
|
owns local listening gain.
|
|
|
|
## Status Meaning
|
|
|
|
Keep three questions separate: is the media path available, is this picture
|
|
playing, and is this particular stream limited? An available path does not
|
|
prove excellent quality. One weak child does not make its parent's received
|
|
picture or a healthy sibling unhealthy.
|
|
|
|
The shared [visual language](./visual-language.md) owns colours, cast, shapes,
|
|
panel accents and motion. This document owns the evidence and scope that select
|
|
those meanings. The current status supplies tone and progress for a reused comic and its localized tooltip.
|
|
|
|
## Projection Rules
|
|
|
|
- Overlay: appears when there is no usable picture, an intentional Host pause,
|
|
or a required user action. Ordinary quality warnings never cover playback.
|
|
Initial connection guidance is not an error even though it occupies the stage.
|
|
- The share stage shows source pause, picture waiting and required playback
|
|
actions. A watch with no assigned input shows neutral waiting while the
|
|
channel planner seeks a route. Preparation, delivery and playback failures
|
|
offer recovery at the affected share. Troubleshooting follows the observed
|
|
failure and uses bounded diagnostic context.
|
|
- Room participation follows the workspace's presence and activity projections.
|
|
Remote-control grants belong to the controls for the selected share.
|
|
[3.0 Room Workspace](./visual-language.md#30-room-workspace)
|
|
- The [published 2.x status rules](https://github.com/TNTcraftHIM/Piik/blob/v2.8.0/docs/standards/media-status.md#projection-rules)
|
|
define the television indicator, activity titles, Host couch route lamps,
|
|
Viewer readiness motion and remote-control marks.
|
|
- Integrated pawn accessories describe participation: headphones mean voice
|
|
membership, worn on the head while listening and around the neck when listening
|
|
is paused. The microphone boom extends when input is on and folds up when muted.
|
|
Shared glyphs use the cast's ink and existing pawn motion. The headset and
|
|
microphone reflect voice membership, listening and microphone state. Leaving
|
|
voice removes the headset. Pausing listening keeps microphone state and
|
|
forwarding independent.
|
|
Accessory positions do not assert connection health or speaking activity.
|
|
When measured voice levels are available, the microphone boom may show that
|
|
activity. Use the speaking endpoint's current room stream; forwarding a voice
|
|
or sharing its user identity does not make it the local microphone.
|
|
- Header: the page's connection to the room server. Its control-link comics
|
|
show a Browser and server, not a failed video path. A media-route failure can
|
|
coexist with a healthy server connection, and vice versa.
|
|
- Connection notice: signaling recovery may coexist with healthy media. It
|
|
cannot convert proved playback into waiting or hide media recovery. The
|
|
presentation stage owns the primary media status; a coexisting notice never
|
|
selects that status or asserts another connection's health.
|
|
- Notices: necessary coexisting issues and operation feedback use the existing
|
|
pills below the stage; they are not another primary media status. Ordinary
|
|
notices stay outside the picture and are hidden with surrounding controls in
|
|
theatre mode. Operation results have a dismiss button; condition-based notices
|
|
disappear when their owning condition clears. Signal recovery must not leave
|
|
a stale operation warning after reconnection. Remote-input and voice feedback
|
|
stays in its own controls or tool panel. Raw
|
|
PeerConnection errors remain diagnostic observations, not persistent red
|
|
warnings after media recovers. Scope outbound quality warnings to their own media edge.
|
|
The operation supplies its outcome tone and matching scene together. Neither
|
|
the presence of an illustration nor a default checkmark proves success;
|
|
partial application retains a limitation instead of claiming completion.
|
|
- Source sound: every capture source with confirmed absent source audio keeps
|
|
the same neutral notice and detail, including camera capture. This describes
|
|
the captured input, not a failure or the mixed output's sound. The microphone
|
|
control owns voice state separately; do not hide facts by source category or
|
|
infer missing audio while capture details are unknown.
|
|
- Host absence: without a proved current picture, a stopped/unknown Host means
|
|
waiting for sharing, and an offline Host means waiting for return. A failed
|
|
route does not override those facts. Retain route evidence so reconnection
|
|
alone cannot claim media recovery; independent playback/server errors retain
|
|
their meaning. An authenticated snapshot with an absent Host does not identify
|
|
why the Host is absent: use neutral waiting. Only the explicit sharing-stop
|
|
event establishes an intentional stop; do not reconstruct it from a retained
|
|
share generation or remembered messages.
|
|
- Topology: unready edges use the blue pending treatment. Readiness alone cannot
|
|
distinguish initial connection from recovery, so this view does not invent a
|
|
warning. Confirmed interruption remains owned by the status projection.
|
|
- The tab title follows room navigation. It shows Piik, the current room name
|
|
when available, and any configured site name distinct from Piik.
|
|
- Recovery: every projection is recomputed from current facts. A warning requires
|
|
current evidence; an expired or mismatched sample becomes unknown, not healthy
|
|
or disconnected. In 2.x, a ready participant can return to a green readiness
|
|
lamp without claiming that its quality has recovered. No warning latch or
|
|
additional timer is needed.
|
|
|
|
## Evidence And Integration Boundary
|
|
|
|
Use WebRTC `connectionState` for transport explanation, not first-frame proof.
|
|
`disconnected` may recover; `failed` is terminal for that connection. Closing a
|
|
retired connection is not an error in the replacement connection.
|
|
`qualityLimitationReason` describes an **outbound** encoder. A relay's sender
|
|
warning must never become a warning about its own inbound picture. Low FPS,
|
|
resolution or bitrate alone does not prove poor quality; a static screen or a
|
|
small source can legitimately need little data. Do not introduce UI thresholds
|
|
or a new quality score.
|
|
|
|
2.x roster messages expose committed `mediaReady` to both roles, not a
|
|
complete remote quality/failure state. Missing readiness means waiting or
|
|
recovery, not confirmed disconnection; departed participants leave the roster.
|
|
Viewer receive evidence is shared with its parent and the Host, not with every
|
|
other Viewer. No additional remote-quality broadcast is needed.
|
|
|
|
The 2.x Host's amber participant lamp requires an active share, committed
|
|
readiness, fresh receive evidence for the current upstream, and a positive
|
|
`freezeCountDelta` or `freezeDurationMsDelta`. The existing evidence-expiry path
|
|
clears stale warnings. Hidden, paused and other diagnostic-only windows provide
|
|
no freeze proof; low FPS, resolution or bitrate is not a substitute.
|
|
|
|
All `*Delta` metrics describe one observation window and never inherit an older
|
|
non-null value. Non-window fields retain the existing details-display cache.
|
|
Participant status reads the current evidence directly; it adds no stored
|
|
status, timer, threshold or score. Detailed sender/receiver metrics
|
|
remain available in connection details and diagnostic reports with their original scope.
|
|
Selected-candidate addresses may be shown only on the Browser that owns that
|
|
connection; they are never uploaded, persisted or used for identity or route
|
|
selection. Report export follows the
|
|
[diagnostics owner](../../prototype/channel-server/README.md#app-diagnostics).
|
|
|
|
Playback facts are typed and belong to their current media binding: a retired
|
|
binding's result cannot overwrite the current one, and raw server errors are
|
|
never rendered directly. Decoded-frame silence is not a route-failure signal. A
|
|
live source can stop repainting; media-framework failures, not an application
|
|
silence timer, own recovery. First-frame admission and candidate proof still
|
|
require decoded progress.
|
|
|
|
Previews render the production projection and metric components with explicit
|
|
sample inputs. They do not add quality facts absent from the real workflow.
|
|
|
|
## Playback Ownership
|
|
|
|
Each picture input has its own video element. A new input takes over the
|
|
display, playback controls, sound and window modes after its first presented
|
|
frame. Use `requestVideoFrameCallback()` where available and decoded progress
|
|
otherwise. A handoff preserves local pause and volume. An audio track change
|
|
updates only sound. Rotation is local to each player and starts at its
|
|
original orientation.
|
|
|
|
Autoplay rejection exposes the play action. A play attempt canceled by pause
|
|
or rebinding preserves frame proof and local playback controls.
|
|
|
|
Picture-in-picture uses the browser's native video window, including Safari's
|
|
presentation-mode API. Native enter and leave events own its displayed state;
|
|
closing the window does not create another playback owner. Successful entry
|
|
leaves this video's page fullscreen. Unmounting a player closes only its own
|
|
window, unless the stage keeps it for a
|
|
[confirmed successor](../research/channel-network-design.md#synchronized-video-sources).
|
|
An unavailable capability stays disabled with an explanation. See the
|
|
[PiP specification](https://w3c.github.io/picture-in-picture/).
|
|
|
|
By default, a hidden or unfocused sharer page suspends its local preview,
|
|
except while that video is in picture-in-picture. Playback settings can turn
|
|
this off, for example to keep watching on another monitor; the choice is
|
|
remembered for the Browser origin. Returning to the page or changing the
|
|
preference preserves an explicit local pause.
|
|
|
|
## References
|
|
|
|
- [W3C WebRTC connection states](https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectionstate):
|
|
transport lifecycle is distinct from receiving and presenting media.
|
|
- [W3C WebRTC statistics](https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-qualitylimitationreason):
|
|
native `none`, `bandwidth`, `cpu`, `other` describe outbound limitations.
|
|
- [LiveKit connection quality](https://docs.livekit.io/intro/basics/rooms-participants-tracks/webhooks-events/#connection-quality):
|
|
quality and connection events are separate; unknown is an explicit value.
|
|
- [LiveKit reconnection](https://docs.livekit.io/intro/basics/connect/#network-changes-and-reconnection):
|
|
transient signaling/media recovery does not always interrupt the picture.
|
|
|
|
We reuse these distinctions and the existing Piik owners, not a new SDK, scoring
|
|
algorithm or transport policy.
|