mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Add options documentation
This commit is contained in:
@@ -1,30 +1,72 @@
|
||||
import type { WhitelistItemData } from "./background/whitelist";
|
||||
|
||||
export interface Options {
|
||||
/** Native messaging host name. */
|
||||
bridgeApplicationName: string;
|
||||
|
||||
/** Attempt to connect to daemon if native messaging fails. */
|
||||
bridgeBackupEnabled: boolean;
|
||||
/** Daemon WebSocket server host. */
|
||||
bridgeBackupHost: string;
|
||||
/** Daemon WebSocket server port. */
|
||||
bridgeBackupPort: number;
|
||||
/** Whether daemon WebSocket server uses HTTPS. */
|
||||
bridgeBackupSecure: boolean;
|
||||
/** Daemon password. */
|
||||
bridgeBackupPassword: string;
|
||||
|
||||
/** HTML5 media/image casting. */
|
||||
mediaEnabled: boolean;
|
||||
/** Sync media element state with remote media. */
|
||||
mediaSyncElement: boolean;
|
||||
/** Stop media cast session if page is closed. */
|
||||
mediaStopOnUnload: boolean;
|
||||
/** Casting for media on local filesystem. */
|
||||
localMediaEnabled: boolean;
|
||||
/** HTTP server port for local media. */
|
||||
localMediaServerPort: number;
|
||||
|
||||
/** Screen mirroring casting. */
|
||||
mirroringEnabled: boolean;
|
||||
/** Chromecast receiver app ID for mirroring. */
|
||||
mirroringAppId: string;
|
||||
/** Max frame rate for mirroring WebRTC media stream. */
|
||||
mirroringStreamMaxFrameRate: number;
|
||||
/** Max bitrate for mirroring WebRTC media stream. */
|
||||
mirroringStreamMaxBitRate: number;
|
||||
/**
|
||||
* Base `scaleResolutionDownBy` parameter for mirroring WebRTC media
|
||||
* stream.
|
||||
*/
|
||||
mirroringStreamDownscaleFactor: number;
|
||||
/** Max width/height to use for calculating final
|
||||
* `scaleResolutionDownBy` parameter for mirroring WebRTC media
|
||||
* stream.
|
||||
*/
|
||||
mirroringStreamMaxResolution: { width?: number; height?: number };
|
||||
/** Whether to apply max resolution limits to mirroring WebRTC media
|
||||
* stream.
|
||||
*/
|
||||
mirroringStreamUseMaxResolution: boolean;
|
||||
|
||||
/**
|
||||
* Close receiver selector popup if another browser window is
|
||||
* focused.
|
||||
*/
|
||||
receiverSelectorCloseIfFocusLost: boolean;
|
||||
/** Close receiver selector after a session is established. */
|
||||
receiverSelectorWaitForConnection: boolean;
|
||||
/** Auto-expand active sessions managed by the extension. */
|
||||
receiverSelectorExpandActive: boolean;
|
||||
|
||||
/** User agent replacement whitelist enabled. */
|
||||
siteWhitelistEnabled: boolean;
|
||||
/** User agent replacement whitelist items data. */
|
||||
siteWhitelist: WhitelistItemData[];
|
||||
/** Custom user agent string for whitelist. */
|
||||
siteWhitelistCustomUserAgent: string;
|
||||
|
||||
/** Show advanced options on options page. */
|
||||
showAdvancedOptions: boolean;
|
||||
|
||||
[key: string]: Options[keyof Options];
|
||||
@@ -37,11 +79,13 @@ export default {
|
||||
bridgeBackupPort: 9556,
|
||||
bridgeBackupSecure: false,
|
||||
bridgeBackupPassword: "",
|
||||
|
||||
mediaEnabled: true,
|
||||
mediaSyncElement: false,
|
||||
mediaStopOnUnload: false,
|
||||
localMediaEnabled: true,
|
||||
localMediaServerPort: 9555,
|
||||
|
||||
mirroringEnabled: false,
|
||||
mirroringAppId: MIRRORING_APP_ID,
|
||||
mirroringStreamMaxFrameRate: 15,
|
||||
@@ -49,11 +93,14 @@ export default {
|
||||
mirroringStreamDownscaleFactor: 1.0,
|
||||
mirroringStreamMaxResolution: { width: 1920, height: 1080 },
|
||||
mirroringStreamUseMaxResolution: true,
|
||||
|
||||
receiverSelectorCloseIfFocusLost: true,
|
||||
receiverSelectorWaitForConnection: true,
|
||||
receiverSelectorExpandActive: true,
|
||||
|
||||
siteWhitelistEnabled: true,
|
||||
siteWhitelist: [{ pattern: "https://www.netflix.com/*", isEnabled: true }],
|
||||
siteWhitelistCustomUserAgent: "",
|
||||
|
||||
showAdvancedOptions: false
|
||||
} as Options;
|
||||
|
||||
Reference in New Issue
Block a user