Skip to content
Type

InputEvents ​

Describes the events that an Input emits, with each key being an event name and its value being the event data.

ts
type InputEvents = {
	source: {
		source: Source;
		request: SourceRequest | null;
		isRoot: boolean;
	};
};

See Source and SourceRequest.

Properties ​

source ​

ts
source: {
	/** The loaded source. */
	source: Source;
	/**
	 * The request that led to loading this source. Can be `null` if the input is not pathed or the root
	 * was requested.
	 */
	request: SourceRequest | null;
	/** Whether the source is the root file of the media. */
	isRoot: boolean;
};

Emitted whenever a Source is loaded by the input. Useful to track reads.

See Source and SourceRequest.

Released under the Mozilla Public License 2.0.