PlayerMediaSource
A packet cursor over one opened item. The engine closes it with its session.
Properties
Files the container carries beside its streams, Matroska attachments above all. Fonts are the ones that matter: a typeset ASS track ships the faces it was authored with, and the subtitle typesetter loads every MediaAttachment.isFont entry before it draws. Empty for a container that carries none, and for a source that cannot read them.
What the container declares as its overall bit rate, in bits per second.
True when duration is an estimate rather than a length the media states, such as FFmpeg's guess from the bit rate of an ADTS AAC file or of an MP3 without its Xing header, which for variable bit rate audio is minutes out (#422). The engine then cuts no seek, start position or clock at it, and once playback passes it, or ends before it, reports the length played.
The channels of a multiplex, each a set of streams that play together, or empty when the container declares none (#505). Every io.github.yuroyami.kiteplayer.MediaProgram.tracks entry names one of streams by its index, and every number is one only that programme has. The engine lists them in io.github.yuroyami.kiteplayer.Tracks.programs and, when there are two or more, picks every track from one of them.
The io.github.yuroyami.kiteplayer.StreamVariant.index of the variant this source reads, or null.
True when each alternate sound arrives by a download of its own, as an HLS or a DASH audio rendition does (#455), rather than in the same bytes as the picture, as every track of a file does. Reading such a sound costs bandwidth whether anyone hears it or not, so the engine then reads only the sound being heard. A switch to another one reads it from the moment playing, by a seek of the reads that keeps what the other streams already hold when the source can seek, and the sound being heard goes on until the new one covers that moment.
Fields where the container's declaration and the decoder disagree.
Every stream the container declares, including streams this build cannot decode.
The seek bar pictures the media carries, such as a DASH thumbnail set or an HLS image playlist, or null when it carries none (#433). The engine lists them in io.github.yuroyami.kiteplayer.Tracks.thumbnails.
True when this container may contain timestamp discontinuities, MPEG-TS above all.
The versions of this media at other qualities, such as the variants of an HLS master playlist, or empty for media with one version. The engine lists them in io.github.yuroyami.kiteplayer.Tracks.variants.
Functions
Tells the sender of a realTime stream that the player has stopped reading because it is paused (#441), and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on.
Reads the next packet from any selected stream.
Lifts a pauseReading: the sender plays on, which for a live stream is the live edge, so the engine drops what it had buffered before the pause and plays what arrives from here (#441). Called on the demux lane, only after a pauseReading that answered true.
Moves the read cursor to a keyframe at or before target.
Packets for streams outside this set are read and discarded by the source.