mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +00:00
Implement receiver action listeners
This commit is contained in:
@@ -11,18 +11,30 @@ export enum ReceiverSelectorMediaType {
|
||||
, File = 8
|
||||
}
|
||||
|
||||
export interface ReceiverSelection {
|
||||
export enum ReceiverSelectionActionType {
|
||||
Cast = 1
|
||||
, Stop = 2
|
||||
}
|
||||
|
||||
export interface ReceiverSelectionCast {
|
||||
actionType: ReceiverSelectionActionType.Cast;
|
||||
receiver: Receiver;
|
||||
mediaType: ReceiverSelectorMediaType;
|
||||
filePath?: string;
|
||||
}
|
||||
export interface ReceiverSelectionStop {
|
||||
actionType: ReceiverSelectionActionType.Stop;
|
||||
receiver: Receiver;
|
||||
}
|
||||
|
||||
export type ReceiverSelection = ReceiverSelectionCast | ReceiverSelectionStop;
|
||||
|
||||
|
||||
export interface ReceiverSelectorEvents {
|
||||
"selected": ReceiverSelection;
|
||||
"selected": ReceiverSelectionCast;
|
||||
"error": string;
|
||||
"cancelled": void;
|
||||
"stop": { receiver: Receiver };
|
||||
"stop": ReceiverSelectionStop;
|
||||
}
|
||||
|
||||
export default interface ReceiverSelector
|
||||
|
||||
Reference in New Issue
Block a user