mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Move some background modules to a separate folder and fix init order
This commit is contained in:
37
ext/src/background/receiverSelector/ReceiverSelector.ts
Normal file
37
ext/src/background/receiverSelector/ReceiverSelector.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
|
||||
import { TypedEventTarget } from "../../lib/typedEvents";
|
||||
import { Receiver } from "../../types";
|
||||
|
||||
|
||||
export enum ReceiverSelectorMediaType {
|
||||
App = 1
|
||||
, Tab = 2
|
||||
, Screen = 4
|
||||
, File = 8
|
||||
}
|
||||
|
||||
export interface ReceiverSelection {
|
||||
receiver: Receiver;
|
||||
mediaType: ReceiverSelectorMediaType;
|
||||
filePath?: string;
|
||||
}
|
||||
|
||||
|
||||
export interface ReceiverSelectorEvents {
|
||||
"selected": ReceiverSelection;
|
||||
"error": void;
|
||||
"cancelled": void;
|
||||
}
|
||||
|
||||
export default interface ReceiverSelector
|
||||
extends TypedEventTarget<ReceiverSelectorEvents> {
|
||||
|
||||
readonly isOpen: boolean;
|
||||
|
||||
open (receivers: Receiver[]
|
||||
, defaultMediaType: ReceiverSelectorMediaType
|
||||
, availableMediaTypes: ReceiverSelectorMediaType): void;
|
||||
|
||||
close (): void;
|
||||
}
|
||||
Reference in New Issue
Block a user