Updated on 2024-11-15 GMT+08:00
SDK Usage
- Create a container.
<body> <div id='preview' style='width:1280px; height:720px'> </div> </body>
- Create a client by referring to createClient.
const client = HWLLSPlayer.createClient()
- Enter the stream URL and container ID to start playback. See startPlay.
const streamUrl = 'webrtc://domain/appname/streamname' client.startPlay(streamUrl, { elementId: 'preview', // (Mandatory) Container ID. Generally, the ID of the div tag is transferred. Here, the ID of the div container in step 1 is entered. })
- Stop the playback by referring to stopPlay.
client.stopPlay()
- Release resources by referring to destroyClient.
client.destroyClient()
See Advanced Usage.
Parent topic: Web SDK
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.