Unify receiver selector launching and allow switching to app media type

This commit is contained in:
hensm
2020-01-14 02:56:53 +00:00
parent a23ae9efa8
commit d4f71e7dcf
4 changed files with 52 additions and 47 deletions

View File

@@ -156,15 +156,11 @@ export default new class ShimManager {
case "main:/selectReceiverBegin": {
const contentTab = await browser.tabs.get(shim.contentTabId);
const availableMediaTypes = getMediaTypesForPageUrl(
contentTab.url);
try {
const selection = await ReceiverSelectorManager
.getSelection(
ReceiverSelectorMediaType.App
, availableMediaTypes
, shim.requestedAppId);
const selection =
await ReceiverSelectorManager.getSelection(
shim.contentTabId, shim.contentFrameId);
// Handle cancellation
if (!selection) {