Seven descriptors written from their pages replace seven stubs. All are version 3; 1.5.2 announced Speaker, StepSpeaker, EqualizerController and PlaybackStateReporter as version 1, and all but ChannelController without a property. StepSpeaker has no properties object in discovery and PlaybackController one without fields, next to supportedOperations; a directive for an operation the device did not list is answered with INVALID_DIRECTIVE. The equalizer declares bands, modes or both under "configurations", a TV its inputs from the 61 names of the page. Not described: the lineup of ChannelController, whose discovery example the page folds away. The discovery examples of InputController spell one key "friendNames"; the fixtures have friendlyNames, as its table does. 62 examples of the six pages are saved as fixtures. 241 tests pass, 215 before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
57 lines
2.4 KiB
TypeScript
57 lines
2.4 KiB
TypeScript
import type { Declared } from "../types.js";
|
|
declare const OPERATIONS: readonly ["Play", "Pause", "Stop", "Next", "Previous", "FastForward", "Rewind", "StartOver"];
|
|
type Operation = (typeof OPERATIONS)[number];
|
|
interface Options {
|
|
supportedOperations?: Operation[];
|
|
}
|
|
/**
|
|
* Play, pause and the other buttons of a player. The interface reports nothing: what plays is the playbackState of
|
|
* Alexa.PlaybackStateReporter, which a Response to these directives has in its context. Errors of a video device go
|
|
* under Alexa.Video, the others under Alexa.
|
|
*/
|
|
export declare const PlaybackController: import("../types.js").InterfaceDescriptor<{}, {
|
|
Play: {
|
|
name: "Play";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
Pause: {
|
|
name: "Pause";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
Stop: {
|
|
name: "Stop";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
Next: {
|
|
name: "Next";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
Previous: {
|
|
name: "Previous";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
FastForward: {
|
|
name: "FastForward";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
Rewind: {
|
|
name: "Rewind";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
StartOver: {
|
|
name: "StartOver";
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
|
when: ({ options }: Declared<Options>) => boolean;
|
|
};
|
|
}, import("../schema.js").InferShape<{
|
|
/** Default: all eight. */
|
|
supportedOperations: import("../schema.js").OptionalSchema<("Play" | "Pause" | "Stop" | "Next" | "Previous" | "FastForward" | "Rewind" | "StartOver")[]>;
|
|
}>, false>;
|
|
export {};
|