PlayerMemento
Everything needed to come back to where playback was: the queue, the item, the position and every setting. Taken with KitePlayer.memento, handed back to KitePlayer.restore. A value the application stores however it likes; no serialisation is imposed. asProperties is a flat string form for applications that keep key-value text, and fromProperties reads it back.
What the text form cannot carry: MediaItem.io factories, which nobody can store, MediaItem.externalSubtitles, MediaItem.thumbnails, MediaItem.videoFilter and MediaItem.audioFilter. asProperties drops all five, and an item that needs one is rebuilt by the application before KitePlayer.restore. Headers, raw open options, the format hint, the demux settings, the start position, the clip, and the title, artist and album are strings and travel.
Tracks are remembered by LANGUAGE rather than by id, because ids belong to one open of one container and a memento outlives both.
Constructors
Properties
The language of the audio track that was playing, or null when unknown or none.
How far the dialogue was raised or lowered in a downmix, in decibels (#442). It travels.
Whether only the forced pictures of an image subtitle track drew (#513).
How far the pitch was moved, in semitones (#465). It travels with the speed.
The shuffled play order, as positions into queue, when shuffle was on. Empty when shuffle was off. KitePlayer.restore continues this order rather than drawing a new one, so the items already heard do not come round again.
The language of the second subtitle track that was showing, or null when none was.
Whether the silent stretches were shortened (#429). A listening setting, so it travels.
What the two front speakers played. An accessibility setting, so it travels (#462).
The language of the subtitle track that was showing, or null when unknown or none.
Subtitle size, place and styling. Accessibility settings, so they travel.
True when the media had subtitle tracks and none was selected: the viewer turned them off.
False when the viewer was playing sound only.
Functions
Flat string pairs, version-stamped. Keys: version, queue.size, then per item queue.N.uri, queue.N.formatHint, queue.N.startPosition (microseconds), queue.N.clipStart and queue.N.clipEnd (microseconds) for a clipped item, queue.N.title, queue.N.artist, queue.N.album, queue.N.audioContent when it is not automatic, queue.N.header.<name>, queue.N.option.<key> and queue.N.demux.<field>; then queueOrder as space-separated positions when there is one, one key per setting, durations in microseconds, and audioLanguage and subtitleLanguage only when known.