-
Notifications
You must be signed in to change notification settings - Fork 48
feat: hi-fi audio #2305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: hi-fi audio #2305
Changes from 12 commits
d5be70f
c852a3d
95882a8
2048b9f
6dfa824
dbfeb4b
e67341c
3b6b6ba
c7c09a2
2e863d3
29f635f
0c456d0
f313bfb
85409e1
b9b4de9
98c48cc
7007a8d
017bf65
c740cd9
b9cac85
14c9d1d
5c529a8
dea2f2a
fb6fdd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -509,6 +509,23 @@ export abstract class DeviceManager< | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| protected reconcileOptimisticStatus = async (): Promise<void> => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const target = this.state.optimisticStatus; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| await withCancellation(this.statusChangeConcurrencyTag, async (signal) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (target === 'enabled' && this.state.status !== 'enabled') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| await this.unmuteStream(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!signal.aborted) this.state.setStatus('enabled'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else if (target === 'disabled' && this.state.status === 'enabled') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // mirror whatever disable() does to stop/pause the track per disableMode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!signal.aborted) this.state.setStatus('disabled'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } finally { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!signal.aborted) this.state.setPendingStatus(this.state.status); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+512
to
+528
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Missing stream muting when reconciling to disabled state. When reconciling the status from You must invoke 🐛 Proposed fix protected reconcileOptimisticStatus = async (): Promise<void> => {
const target = this.state.optimisticStatus;
await withCancellation(this.statusChangeConcurrencyTag, async (signal) => {
try {
if (target === 'enabled' && this.state.status !== 'enabled') {
await this.unmuteStream();
if (!signal.aborted) this.state.setStatus('enabled');
} else if (target === 'disabled' && this.state.status === 'enabled') {
- // mirror whatever disable() does to stop/pause the track per disableMode
+ const stopTracks = this.state.disableMode === 'stop-tracks';
+ await this.muteStream(stopTracks);
if (!signal.aborted) this.state.setStatus('disabled');
}
} finally {
if (!signal.aborted) this.state.setPendingStatus(this.state.status);
}
});
};📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private disableTracks() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| this.getTracks().forEach((track) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (track.enabled) track.enabled = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: GetStream/stream-video-js
Length of output: 13989
🏁 Script executed:
Repository: GetStream/stream-video-js
Length of output: 23162
🏁 Script executed:
Repository: GetStream/stream-video-js
Length of output: 5013
🏁 Script executed:
Repository: GetStream/stream-video-js
Length of output: 13668
🏁 Script executed:
Repository: GetStream/stream-video-js
Length of output: 12263
Reject superseded joins instead of resolving them
In
packages/client/src/Call.ts, both supersession bailouts currently return normally, socall.join()can resolve even though a concurrentleave()preventedJOINEDfrom ever being set.callingX.wireAudioEngineSubscription()also runs before the first supersession check, which can reattach the audio engine afterleave()has already unwired/disposed it. Surface a distinct superseded error from these exits and guard the wiring call.🤖 Prompt for AI Agents