Add context menu to receiver selector + other improvements

This commit is contained in:
hensm
2022-05-09 23:45:20 +01:00
parent b1100bd258
commit 5f96e6ef29
9 changed files with 444 additions and 315 deletions

View File

@@ -26,7 +26,6 @@ export interface ReceiverSelectionCast {
actionType: ReceiverSelectionActionType.Cast;
receiverDevice: ReceiverDevice;
mediaType: ReceiverSelectorMediaType;
filePath?: string;
}
export interface ReceiverSelectionStop {
actionType: ReceiverSelectionActionType.Stop;
@@ -39,6 +38,7 @@ interface ReceiverSelectorEvents {
error: string;
cancelled: void;
stop: ReceiverSelectionStop;
close: void;
}
/**
* Manages the receiver selector popup window and communication with the
@@ -268,6 +268,8 @@ export default class ReceiverSelector extends TypedEventTarget<ReceiverSelectorE
this.dispatchEvent(new CustomEvent("cancelled"));
}
this.dispatchEvent(new CustomEvent("close"));
// Cleanup
delete this.windowId;
delete this.messagePort;