Improve app message types

This commit is contained in:
hensm
2021-04-24 07:28:07 +01:00
committed by Matt Hensman
parent 99a40d8302
commit e33531d1ba
11 changed files with 218 additions and 233 deletions

View File

@@ -4,8 +4,8 @@ import castv2 from "castv2";
import Session from "./Session";
import { Message } from "../../types";
import { sendMessage } from "../../lib/messaging"
import { Message } from "../../messaging";
import { sendMessage } from "../../lib/nativeMessaging"
const NS_MEDIA = "urn:x-cast:com.google.cast.media";

View File

@@ -2,8 +2,8 @@
import { Channel, Client } from "castv2";
import { Message } from "../../types";
import { sendMessage } from "../../lib/messaging";
import { Message } from "../../messaging";
import { sendMessage } from "../../lib/nativeMessaging";
export const NS_CONNECTION = "urn:x-cast:com.google.cast.tp.connection";

View File

@@ -4,7 +4,7 @@ import mdns from "mdns";
import StatusListener from "./chromecast/StatusListener";
import { ReceiverStatus } from "../types";
import { sendMessage } from "../lib/messaging";
import { sendMessage } from "../lib/nativeMessaging";
interface CastTxtRecord {
@@ -44,7 +44,7 @@ function onBrowserServiceUp (service: mdns.Service) {
});
}
function onBrowserServiceDown (service: mdns.Service) {
function onBrowserServiceDown (_service: mdns.Service) {
// TODO: Fix service down detection
}
@@ -109,7 +109,7 @@ export function startDiscovery (options: InitializeOptions) {
statusListeners.set(id, listener);
}
function onStatusBrowserServiceDown (service: mdns.Service) {
function onStatusBrowserServiceDown (_service: mdns.Service) {
// TODO: Fix service down detection
}
}

View File

@@ -8,7 +8,7 @@ import stream from "stream";
import mime from "mime-types";
import { sendMessage } from "../lib/messaging";
import { sendMessage } from "../lib/nativeMessaging";
import { convertSrtToVtt } from "../lib/subtitles";

View File

@@ -3,7 +3,7 @@
import child_process from "child_process";
import path from "path";
import { sendMessage } from "../lib/messaging";
import { sendMessage } from "../lib/nativeMessaging";
function fatal (message: string) {