Skip to content

Commit

Permalink
fix(conference): use up to date state in useVideoStream.
Browse files Browse the repository at this point in the history
  • Loading branch information
hristoterezov committed Apr 12, 2024
1 parent e3ee997 commit b470c20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,12 +1337,11 @@ export default {
* @returns {Promise}
*/
useVideoStream(newTrack) {
const state = APP.store.getState();

logger.debug(`useVideoStream: ${newTrack}`);

return new Promise((resolve, reject) => {
_replaceLocalVideoTrackQueue.enqueue(onFinish => {
const state = APP.store.getState();
const oldTrack = getLocalJitsiVideoTrack(state);

logger.debug(`useVideoStream: Replacing ${oldTrack} with ${newTrack}`);
Expand Down

0 comments on commit b470c20

Please sign in to comment.