mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
More receiver selector refactoring
This commit is contained in:
@@ -48,11 +48,13 @@ export function ensureInit(): Promise<TypedMessagePort<Message>> {
|
||||
* URL.
|
||||
*/
|
||||
if (window.location.protocol === "moz-extension:") {
|
||||
const { default: CastManager } = await import("./CastManager");
|
||||
const { default: castManager } = await import(
|
||||
"../background/castManager"
|
||||
);
|
||||
|
||||
// port2 will post bridge messages to port 1
|
||||
await CastManager.init();
|
||||
await CastManager.createInstance(channel.port2);
|
||||
await castManager.init();
|
||||
await castManager.createInstance(channel.port2);
|
||||
|
||||
// bridge -> cast instance
|
||||
channel.port1.onmessage = ev => {
|
||||
|
||||
Reference in New Issue
Block a user