// "project" is an aggregation of information that can be searched in the room list on the debug side. // default: 'default' project?: string;
// "title" is a user-defined parameter that can be used to distinguish the current debugging client, // and the corresponding information is displayed under the "device id" in each debugging connection panel. // default: '--' title?: string;
// Indicates whether the SDK will automatically render the "Circle with Logo on White Background" // control in the bottom left corner of the client when initiation is complete. If set to false, // you can call window.$pageSpy.render() to render it manually. // default: true autoRender?: boolean;
// Manually specify the scheme of the PageSpy service. // This works if the SDK can't correctly analyse the scheme, e.g. if PageSpy's browser plugin // is introduced into the SDK via chrome-extension://xxx/sdk/index.min.js, which will be // be parsed by the SDK as an invalid "chrome-extension://" and fallback to ["http://", "ws://"]. // - (Default) Pass the value undefined or null: the SDK will parse it automatically; // - Pass boolean value: // - true: the SDK will access the PageSpy service via ["https://", "wss://"]. // - false: the SDK will access the PageSpy service via ["http://", "wss://"] enableSSL?: boolean | null;
// All internal plugins are carried with PageSpy by default out of the box. // You can disable some plugins as needed. disabledPlugins?: (InternalPlugins | string)[];
// After adding support for offline replay in PageSpy@1.7.4, the client-integrated SDK can work without // establishing a connection with the debugger. // Default value is false, when users set it to other values will enters "offline mode", where PageSpy // will not create rooms or establish WebSocket connections. offline?: boolean;
// Customize logo source url. logo?: string;
// Customize logo style. logoStyle?: Object; });
常用 API
更新初始化参数
PageSpy 提供了 Device ID 用于识别设备,同时还提供了 project / title 供开发者在初始化时自定义信息,用于辅助识别客户端。但你可能希望在初始化之后更新这些参数信息,操作方式如下: