From 9cd680ed1a7fcc2f510fe095f04eeca1245de7ef Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Wed, 16 Feb 2022 00:59:49 +0400 Subject: [PATCH] Fix changing playback rate with voice and video --- src/components/appMediaPlaybackController.ts | 6 ++++-- src/components/peerProfile.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/appMediaPlaybackController.ts b/src/components/appMediaPlaybackController.ts index 4ad5f297..a9f8991a 100644 --- a/src/components/appMediaPlaybackController.ts +++ b/src/components/appMediaPlaybackController.ts @@ -145,6 +145,10 @@ class AppMediaPlaybackController { this.playingMedia[key] = value; } + if(key === 'playbackRate' && this.playingMediaType !== undefined) { + this.playbackRates[this.playingMediaType] = value as number; + } + this.dispatchPlaybackParams(); } }; @@ -627,8 +631,6 @@ class AppMediaPlaybackController { this.mediaDetails.delete(media); } - this.playbackRates[this.playingMediaType] = this.playbackRate; - this.playingMedia = undefined; this.playingMediaType = undefined; diff --git a/src/components/peerProfile.ts b/src/components/peerProfile.ts index 9781f160..b571e175 100644 --- a/src/components/peerProfile.ts +++ b/src/components/peerProfile.ts @@ -318,7 +318,7 @@ export default class PeerProfile { const peerId = this.peerId; const threadId = this.threadId; - if(!peerId || appPeersManager.isRestricted(peerId)) { + if(!peerId || appPeersManager.isRestricted(peerId) || peerId === rootScope.myId) { return; }