Skip to content

Commit

Permalink
Allow manual operation on audio publications even with adaptiveStream…
Browse files Browse the repository at this point in the history
… enabled (#634)

* Allow manual operation on audio publications even with adaptiveStream enabled

* Create .changeset/polite-eels-swim.md
  • Loading branch information
lukasIO committed Mar 30, 2023
1 parent cb380c2 commit f085fbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-eels-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Allow manual operation on audio publications with adaptiveStream enabled
6 changes: 3 additions & 3 deletions src/room/track/RemoteTrackPublication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc
import { TrackEvent } from '../events';
import type RemoteTrack from './RemoteTrack';
import RemoteVideoTrack from './RemoteVideoTrack';
import type { Track } from './Track';
import { Track } from './Track';
import { TrackPublication } from './TrackPublication';

export default class RemoteTrackPublication extends TrackPublication {
Expand Down Expand Up @@ -238,8 +238,8 @@ export default class RemoteTrackPublication extends TrackPublication {
}

private isManualOperationAllowed(): boolean {
if (this.isAdaptiveStream) {
log.warn('adaptive stream is enabled, cannot change track settings', {
if (this.kind === Track.Kind.Video && this.isAdaptiveStream) {
log.warn('adaptive stream is enabled, cannot change video track settings', {
trackSid: this.trackSid,
});
return false;
Expand Down

0 comments on commit f085fbe

Please sign in to comment.