Fix media casting handling unified receiver selector

This commit is contained in:
hensm
2020-01-14 05:02:59 +00:00
parent a2c4e972c7
commit c522343eb8
4 changed files with 28 additions and 19 deletions

View File

@@ -153,10 +153,23 @@ async function initMenus () {
const availableMediaTypes = getMediaTypesForPageUrl(info.pageUrl);
switch (info.menuItemId) {
case menuIdMediaCast: {
case menuIdCast: {
const selection = await ReceiverSelectorManager.getSelection(
tab.id, info.frameId);
loadSender({
tabId: tab.id
, frameId: info.frameId
, selection
});
break;
}
case menuIdMediaCast: {
const selection = await ReceiverSelectorManager.getSelection(
tab.id, info.frameId, true);
// Selection cancelled
if (!selection) {
break;
@@ -192,19 +205,6 @@ async function initMenus () {
break;
}
case menuIdCast: {
const selection = await ReceiverSelectorManager.getSelection(
tab.id, info.frameId);
loadSender({
tabId: tab.id
, frameId: info.frameId
, selection
});
break;
}
}
});