pi-webrtc

Options

這一頁還沒有中文版,以下顯示英文原文。

The options of new PiCamera(options).

OptionTypeDefaultDescription
signaling'mqtt' | 'livekit' | 'cloudflare'mqttHow the SDK reaches the device.
uidstringThe --uid of the device. Used by mqtt and cloudflare.
mqttHoststringThe MQTT broker host.
mqttPathstring/mqttThe MQTT broker path.
mqttPortnumberThe WebSocket port of the MQTT broker, such as 8084 on EMQX Serverless.
mqttProtocolstringwssThe protocol for the MQTT broker.
mqttUsernamestringThe username for the MQTT broker.
mqttPasswordstringThe password for the MQTT broker.
livekitUrlstringThe WebSocket URL of the LiveKit server. The same as the device's --livekit-url.
livekitKeystringThe LiveKit API key, the same as the device's --livekit-key. Not the same as apiKey.
livekitRoomstringThe room to join. The same as the device's --livekit-room.
userIdstringrandom UUIDThe name of this viewer in the SFU room.
apiUrlstringThe base URL of the device API, used by both SFU paths.
apiKeystringThe viewer key for the device API, sent as Authorization: Bearer.
stunUrlsstring[]STUN server URLs. Leave it out, or set null, on a local network or a VPN.
turnUrlsstring[]TURN server URLs.
turnUsernamestringThe username for the TURN server.
turnPasswordstringThe password for the TURN server.
timeoutnumber10000The connection timeout, in milliseconds.
datachannelOnlybooleanfalseConnect for data only, without video or audio.
isMicOnbooleantrueTurn on the local microphone when the connection is up.
isSpeakerOnbooleantruePlay the remote audio when the connection is up.
codecstringH264, VP8, VP9 or AV1. Only used with mqtt. With livekit and cloudflare, the SFU forwards the codec that the device published.
maxBitratenumberThe most video bitrate the device may send to this viewer, in kbps. Only used with mqtt. See Bandwidth.
jitterBufferTargetnumberHow many milliseconds of media the receive buffer should hold (0 to 4000). See setJitterBufferTarget.
在 GitHub 上編輯此頁