A resolver for local files by extension: when anyone opens such a file with
Player.open (the Open dialog, the playlist, next / previous, the
recent list, a drop that calls open), the player asks this plugin for a
stream it generates instead of playing the file.
Remarks
The open keeps everything of the original call: its ifCurrent, its
operation (the opener's open and media.ready() settle as for any
file), paused (the stream starts paused), and its path as
state.source, with state.kind"stream". A thrown error fails that
open: phase"error" with the error's message as state.error,
word for word. The stream belongs to this plugin, as with
Player.openStream.
Cancellation: signal aborts when the open is replaced, closed
(player.close(), F4) or times out (30 seconds), or this resolver is
disposed. Cancelled after resolve returned but before the stream ran,
the SDK releases the stream and never calls started.
One extension has one resolver: another plugin's resolver for it makes
Resolver.ready reject with conflict without failing activation
(the player shows a warning). When this plugin stops, its extensions are
free again and such files go to the player as before.
Example: Play CHIP-8 programs with the plugin's own emulator
Opening a .ch8 file anywhere in the player (Open dialog, playlist,
recent list) runs it in the plugin's emulator instead of failing as an
unknown format. The player calls resolve with the path; the plugin
reads the program and returns a stream whose frame() the SDK pulls on
the audio clock, one 1/60 s frame per call. started runs once the
stream plays; signal aborts the read when the open is replaced or
closed.
Lower case, without the dot: 1–16 entries of 1–16 lower-case letters or
digits (not "folder"). Only absolute local paths match, by their
extension in any case (/roms/Game.NES); URLs never do.
A resolver for local files by extension: when anyone opens such a file with Player.open (the Open dialog, the playlist, next / previous, the recent list, a drop that calls
open), the player asks this plugin for a stream it generates instead of playing the file.Remarks
The open keeps everything of the original call: its
ifCurrent, its operation (the opener'sopenandmedia.ready()settle as for any file),paused(the stream starts paused), and its path asstate.source, withstate.kind"stream". A thrown error fails that open:phase"error"with the error's message asstate.error, word for word. The stream belongs to this plugin, as with Player.openStream.Cancellation:
signalaborts when the open is replaced, closed (player.close(), F4) or times out (30 seconds), or this resolver is disposed. Cancelled afterresolvereturned but before the stream ran, the SDK releases the stream and never callsstarted.One extension has one resolver: another plugin's resolver for it makes Resolver.ready reject with
conflictwithout failing activation (the player shows a warning). When this plugin stops, its extensions are free again and such files go to the player as before.Example: Play CHIP-8 programs with the plugin's own emulator
Opening a
.ch8file anywhere in the player (Open dialog, playlist, recent list) runs it in the plugin's emulator instead of failing as an unknown format. The player callsresolvewith the path; the plugin reads the program and returns a stream whoseframe()the SDK pulls on the audio clock, one 1/60 s frame per call.startedruns once the stream plays;signalaborts the read when the open is replaced or closed.Since
1.5.3