The WebRTC SDK helps developers quickly access IPC services.
Obtain clientId
and secret
according to the Tuya IoT Platform Quick Start.
Update clientId
and secret
in Demo webrtc.json.
Visit the Tuya open platform authorization page and enter the Tuya account Password, agree to authorization, intercept the authorization code code
in the browser callback URL, where {clientId}
is the clientId obtained in step 2.
Update the code
in Demo webrtc.json.
Select an IPC in the Tuya Smart APP, query the device ID, and update it to the deviceId
of Demo webrtc.json.
In the Demo source code path, execute go get
and then execute go build
.
Run ./webrtc-web-sample
.
Open http://localhost:3333
in Chrome, click Call
to start a WebRTC session.
/av/u/
in the result.source_topic.ipc
JSON field as the from
field in the MQTT Header, so that you can correctly receive the message from the Tuya MQTT service.You can get Tuya developer technical support in the following ways: