mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +00:00
Replace remaining console calls with logger calls
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import bridge from "../../lib/bridge";
|
||||
import knownApps from "../../lib/knownApps";
|
||||
import logger from "../../lib/logger";
|
||||
import options from "../../lib/options";
|
||||
|
||||
import { TypedEventTarget } from "../../lib/typedEvents";
|
||||
@@ -145,8 +146,7 @@ export default class NativeReceiverSelector
|
||||
private async onBridgePortMessageError (
|
||||
message: NativeReceiverSelectorErrorMessage) {
|
||||
|
||||
console.error("fx_cast (Debug): Native receiver selector error"
|
||||
, message.data);
|
||||
logger.error("Native receiver selector error", message.data);
|
||||
|
||||
this.dispatchEvent(new CustomEvent("error"));
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ async function getSelection (
|
||||
|
||||
availableMediaTypes = getMediaTypesForPageUrl(url);
|
||||
} catch (err) {
|
||||
console.error("fx_cast (Debug): Failed to locate frame");
|
||||
logger.error("Failed to locate frame");
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
@@ -136,25 +136,25 @@ async function getSelection (
|
||||
}
|
||||
|
||||
function onSelected (ev: any) {
|
||||
console.info("fx_cast (Debug): Selected receiver", ev.detail);
|
||||
logger.info("Selected receiver", ev.detail);
|
||||
resolve(ev.detail);
|
||||
removeListeners();
|
||||
}
|
||||
|
||||
function onCancelled () {
|
||||
console.info("fx_cast (Debug): Cancelled receiver selection");
|
||||
logger.info("Cancelled receiver selection");
|
||||
resolve(null);
|
||||
removeListeners();
|
||||
}
|
||||
|
||||
function onError () {
|
||||
console.error("fx_cast (Debug): Failed to select receiver");
|
||||
logger.error("Failed to select receiver");
|
||||
reject();
|
||||
removeListeners();
|
||||
}
|
||||
|
||||
function onStop (ev: any) {
|
||||
console.info("fx_cast (Debug): Stopped receiver app", ev.detail);
|
||||
logger.info("Stopped receiver app", ev.detail);
|
||||
|
||||
StatusManager.init().then(() => {
|
||||
StatusManager.stopReceiverApp(ev.detail.receiver);
|
||||
|
||||
Reference in New Issue
Block a user