mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Display message in selector instead of disabling browser action
This commit is contained in:
@@ -149,10 +149,15 @@ export default new class StatusManager
|
||||
|
||||
// Cleanup
|
||||
this.receivers.clear();
|
||||
this.bridgePort.onDisconnect.removeListener(
|
||||
this.onBridgePortDisconnect);
|
||||
this.bridgePort.onMessage.removeListener(this.onBridgePortMessage);
|
||||
this.bridgePort = null;
|
||||
|
||||
if (this.bridgePort) {
|
||||
this.bridgePort.onDisconnect.removeListener(
|
||||
this.onBridgePortDisconnect);
|
||||
this.bridgePort.onMessage.removeListener(
|
||||
this.onBridgePortMessage);
|
||||
|
||||
this.bridgePort = null;
|
||||
}
|
||||
|
||||
window.setTimeout(async () => {
|
||||
this.bridgePort = await this.createBridgePort();
|
||||
|
||||
@@ -44,7 +44,7 @@ browser.runtime.onInstalled.addListener(async details => {
|
||||
|
||||
|
||||
function initBrowserAction () {
|
||||
browser.browserAction.disable();
|
||||
/*browser.browserAction.disable();
|
||||
|
||||
function onServiceChange () {
|
||||
if (StatusManager.getReceivers().length) {
|
||||
@@ -55,7 +55,7 @@ function initBrowserAction () {
|
||||
}
|
||||
|
||||
StatusManager.addEventListener("serviceUp", onServiceChange);
|
||||
StatusManager.addEventListener("serviceDown", onServiceChange);
|
||||
StatusManager.addEventListener("serviceDown", onServiceChange);*/
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,6 +100,7 @@ export default class NativeReceiverSelector
|
||||
, i18n_mediaTypeFile: _("popupMediaTypeFile")
|
||||
, i18n_mediaSelectCastLabel: _("popupMediaSelectCastLabel")
|
||||
, i18n_mediaSelectToLabel: _("popupMediaSelectToLabel")
|
||||
, i18n_noReceiversFound: _("popupNoReceiversFound")
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user