update readme

This commit is contained in:
vdalex
2024-02-13 15:21:27 +03:00
parent 11bedf4f17
commit 2ecc0a0991

View File

@@ -144,6 +144,26 @@ iceTransportPolicy: "all"//for option "relay" need use turn server
full list of config you can see on [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters) full list of config you can see on [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters)
#### `onWsClose`
default: null;
handle websocket close event
example:
```js
onWsClose: (code, reason)=>{
switch (code){
case 1000:
case 1006:
//reconect to socket
player.load(source);
break;
default:
player.destroy();
}
}
```
## Methods ## Methods
#### `load(source)` #### `load(source)`