mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Show app name in receiver selector if known based on app ID
This commit is contained in:
@@ -27,6 +27,7 @@ export default class PopupReceiverSelector
|
||||
private wasReceiverSelected: boolean = false;
|
||||
|
||||
private _isOpen: boolean = false;
|
||||
private requestedAppId: string;
|
||||
|
||||
|
||||
constructor () {
|
||||
@@ -59,6 +60,11 @@ export default class PopupReceiverSelector
|
||||
this.messagePortDisconnected = true;
|
||||
});
|
||||
|
||||
this.messagePort.postMessage({
|
||||
subject: "popup:/sendRequestedAppId"
|
||||
, data: { requestedAppId: this.requestedAppId }
|
||||
});
|
||||
|
||||
this.messagePort.postMessage({
|
||||
subject: "popup:/populateReceiverList"
|
||||
, data: {
|
||||
@@ -77,7 +83,10 @@ export default class PopupReceiverSelector
|
||||
public async open (
|
||||
receivers: Receiver[]
|
||||
, defaultMediaType: ReceiverSelectorMediaType
|
||||
, availableMediaTypes: ReceiverSelectorMediaType): Promise<void> {
|
||||
, availableMediaTypes: ReceiverSelectorMediaType
|
||||
, requestedAppId: string): Promise<void> {
|
||||
|
||||
this.requestedAppId = requestedAppId;
|
||||
|
||||
// If popup already exists, close it
|
||||
if (this.windowId) {
|
||||
@@ -124,6 +133,7 @@ export default class PopupReceiverSelector
|
||||
}
|
||||
|
||||
this._isOpen = false;
|
||||
this.requestedAppId = null;
|
||||
|
||||
if (this.messagePort && !this.messagePortDisconnected) {
|
||||
this.messagePort.disconnect();
|
||||
|
||||
Reference in New Issue
Block a user