mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-13 02:49:58 +00:00
Add match patterns to knownApps
This commit is contained in:
@@ -105,7 +105,7 @@ export default class NativeReceiverSelector
|
|||||||
, i18n_castButtonTitle: _("popupCastButtonTitle")
|
, i18n_castButtonTitle: _("popupCastButtonTitle")
|
||||||
, i18n_stopButtonTitle: _("popupStopButtonTitle")
|
, i18n_stopButtonTitle: _("popupStopButtonTitle")
|
||||||
, i18n_mediaTypeApp:
|
, i18n_mediaTypeApp:
|
||||||
knownApps[requestedAppId] ?? _("popupMediaTypeApp")
|
knownApps[requestedAppId].name ?? _("popupMediaTypeApp")
|
||||||
, i18n_mediaTypeTab: _("popupMediaTypeTab")
|
, i18n_mediaTypeTab: _("popupMediaTypeTab")
|
||||||
, i18n_mediaTypeScreen: _("popupMediaTypeScreen")
|
, i18n_mediaTypeScreen: _("popupMediaTypeScreen")
|
||||||
, i18n_mediaTypeFile: _("popupMediaTypeFile")
|
, i18n_mediaTypeFile: _("popupMediaTypeFile")
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
const _ = browser.i18n.getMessage;
|
const _ = browser.i18n.getMessage;
|
||||||
|
|
||||||
|
interface KnownApp {
|
||||||
|
name: string;
|
||||||
|
matches?: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Just keep a list of IDs and cache names from the Google API:
|
* TODO: Just keep a list of IDs and cache names from the Google API:
|
||||||
* https://clients3.google.com/cast/chromecast/device/app?a=[appId]
|
* https://clients3.google.com/cast/chromecast/device/app?a=[appId]
|
||||||
@@ -9,17 +14,21 @@ const _ = browser.i18n.getMessage;
|
|||||||
* Also, localization since the API supports it.
|
* Also, localization since the API supports it.
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
"CA5E8412": "Netflix"
|
// Web-supported
|
||||||
, "233637DE": "YouTube"
|
"CA5E8412": { name: "Netflix" , matches: "https://www.netflix.com/*" }
|
||||||
, "17608BC8": "Prime Video"
|
, "233637DE": { name: "YouTube" , matches: "https://www.youtube.com/*" }
|
||||||
, "CC32E753": "Spotify"
|
, "CC32E753": { name: "Spotify" , matches: "https://open.spotify.com/*" }
|
||||||
, "5E81F6DB": "BBC iPlayer"
|
, "5E81F6DB": { name: "BBC iPlayer" , matches: "https://www.bbc.co.uk/iplayer/*" }
|
||||||
, "03977A48": "BBC Sounds"
|
, "03977A48": { name: "BBC Sounds" , matches: "https://www.bbc.co.uk/sounds/*" }
|
||||||
, "AA666EDD": "Crunchyroll"
|
, "AA666EDD": { name: "Crunchyroll" , matches: "https://crunchyroll.com/*" }
|
||||||
, "10AAD887": "All 4"
|
, "10AAD887": { name: "All 4" , matches: "https://www.channel4.com/*" }
|
||||||
, "9AC194DC": "Plex"
|
, "B3DCF968": { name: "Twitch" , matches: "https://www.twitch.tv/*" }
|
||||||
, "CD7B9F59": "Global Player Live"
|
, "B88B034A": { name: "Dailymotion" , matches: "https://www.dailymotion.com/*" }
|
||||||
, "B3DCF968": "Twitch"
|
|
||||||
, "B88B034A": "Dailymotion"
|
// Misc
|
||||||
, "CC1AD845": _("popupMediaTypeAppMedia")
|
, "17608BC8": { name: "Prime Video" }
|
||||||
} as Record<string, string>;
|
, "9AC194DC": { name: "Plex" }
|
||||||
|
, "CD7B9F59": { name: "Global Player Live" }
|
||||||
|
|
||||||
|
, "CC1AD845": { name: _("popupMediaTypeAppMedia") }
|
||||||
|
} as Record<string, KnownApp>;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class PopupApp extends Component<{}, PopupAppState> {
|
|||||||
disabled={ !(this.state.availableMediaTypes
|
disabled={ !(this.state.availableMediaTypes
|
||||||
& ReceiverSelectorMediaType.App) }>
|
& ReceiverSelectorMediaType.App) }>
|
||||||
{ (this.state.requestedAppId
|
{ (this.state.requestedAppId
|
||||||
&& knownApps[this.state.requestedAppId])
|
&& knownApps[this.state.requestedAppId].name)
|
||||||
?? _("popupMediaTypeApp") }
|
?? _("popupMediaTypeApp") }
|
||||||
</option>
|
</option>
|
||||||
<option value={ ReceiverSelectorMediaType.Tab }
|
<option value={ ReceiverSelectorMediaType.Tab }
|
||||||
|
|||||||
Reference in New Issue
Block a user