Move cast API code to cast/sdk/ and create wrapper class

This commit is contained in:
hensm
2022-04-25 15:59:58 +01:00
parent 43f5d325f8
commit 4bccdecaa3
35 changed files with 707 additions and 1188 deletions

View File

@@ -1,6 +1,5 @@
"use strict";
import * as cast from "./api";
import { Message } from "../messaging";
import { BridgeInfo } from "../lib/bridge";
@@ -12,6 +11,8 @@ import {
sendMessage
} from "./eventMessageChannel";
import CastSDK from "./sdk";
let initializedBridgeInfo: BridgeInfo;
let initializedBackgroundPort: MessagePort;
@@ -103,4 +104,4 @@ export function ensureInit(): Promise<TypedMessagePort<Message>> {
});
}
export default cast;
export default new CastSDK();