mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 09:09:58 +00:00
Rename shim -> cast
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
ReceiverSelectorMediaType
|
||||
} from "../background/receiverSelector";
|
||||
|
||||
import ShimManager from "../background/ShimManager";
|
||||
import CastManager from "../background/CastManager";
|
||||
|
||||
interface LoadSenderOptions {
|
||||
tabId: number;
|
||||
@@ -33,15 +33,15 @@ export default async function loadSender(opts: LoadSenderOptions) {
|
||||
|
||||
switch (opts.selection.mediaType) {
|
||||
case ReceiverSelectorMediaType.App: {
|
||||
const shim = ShimManager.getShim(opts.tabId, opts.frameId);
|
||||
if (!shim) {
|
||||
const instance = CastManager.getInstance(opts.tabId, opts.frameId);
|
||||
if (!instance) {
|
||||
throw logger.error(
|
||||
`Shim not found at tabId ${opts.tabId} / frameId ${opts.frameId}`
|
||||
`Cast instance not found at tabId ${opts.tabId} / frameId ${opts.frameId}`
|
||||
);
|
||||
}
|
||||
|
||||
shim.contentPort.postMessage({
|
||||
subject: "shim:launchApp",
|
||||
instance.contentPort.postMessage({
|
||||
subject: "cast:launchApp",
|
||||
data: { receiver: opts.selection.receiver }
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user