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