mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
clone localMedia,so we don't remove audio track from stream sent to peer
This commit is contained in:
parent
6645f8f43b
commit
590e9500c1
@ -43,7 +43,7 @@ export class LocalMedia {
|
|||||||
* Create an instance of LocalMedia without audio track (for user preview)
|
* Create an instance of LocalMedia without audio track (for user preview)
|
||||||
*/
|
*/
|
||||||
asPreview(): LocalMedia {
|
asPreview(): LocalMedia {
|
||||||
const media = new LocalMedia(this.userMedia, this.screenShare, this.dataChannelOptions);
|
const media = this.clone();
|
||||||
const userMedia = media.userMedia;
|
const userMedia = media.userMedia;
|
||||||
if (userMedia && userMedia.getVideoTracks().length > 0) {
|
if (userMedia && userMedia.getVideoTracks().length > 0) {
|
||||||
const audioTrack = getStreamAudioTrack(userMedia);
|
const audioTrack = getStreamAudioTrack(userMedia);
|
||||||
|
Loading…
Reference in New Issue
Block a user