Skip to content

Commit f5c2e0d

Browse files
committed
updated readme
1 parent a1bb155 commit f5c2e0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,16 @@ call.onRemoteAudioEnabled = (call) => {
195195
};
196196
```
197197

198-
The media viewers set using `call.setLocalMediaView(element)` or `call.setRemoteMediaView(element)`. The `remoteMediaView` DOM element is required for the remote media stream to be displayed. Setting this element’s `autoplay` property to `true` is also recommended.
198+
> A media viewer is a [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement) (e.g. <audio>, <video>) to display media stream. The `remoteMediaView` is required for the remote media stream to be displayed. Setting `autoplay` property of media viewer to `true` is also recommended.
199+
200+
> The media viewers can also be set using `call.setLocalMediaView(element)` or `call.setRemoteMediaView(element)`.
199201
200202
```html
201203
<video id="remote_video_element_id" autoplay>
202204
```
203205

204206
```javascript
205-
//to set media view lazily
207+
//to set media viewer lazily
206208
call.setLocalMediaView(document.getElementById('local_video_element_id'));
207209
call.setRemoteMediaView(document.getElementById('remote_video_element_id'));
208210
```
@@ -241,7 +243,7 @@ SendBirdCall.addListener(UNIQUE_HANDLER_ID, {
241243
}
242244
});
243245
```
244-
>**Note**: If the media viewer elements have been set via `call.setLocalMediaView()` and `call.setRemoteMediaView()`, ensure that the same media views are set in `acceptParams`’s `callOption` . Otherwise, these will be overriden during `call.accept()`
246+
>**Note**: If the media viewer elements have been set via `call.setLocalMediaView()` and `call.setRemoteMediaView()`, ensure that the same media viewers are set in `acceptParams`’s `callOption` . Otherwise, these will be overriden during `call.accept()`
245247
246248
Incoming calls are received via the application's persistent internal server connection, which is established by `SendBirdCall.connectWebSocket()`.
247249
In the event of accidental disconnection, the application will attempt to reconnect every 2 seconds.

0 commit comments

Comments
 (0)