Skip to content

Commit b298159

Browse files
committed
upd: update bitrate and release 1.0.2
1 parent bdff45d commit b298159

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file 🌱.
44

5+
## [1.0.2]
6+
### Added
7+
- 优化推流码率,提高预览清晰度
8+
59
## [1.0.1]
610
### Added
711
- 新增开机自启动管理功能

src/ui/services/mediasoup-webrtc-client.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
RtpCapabilities,
66
TransportOptions,
77
Producer,
8-
RtpParameters
8+
RtpParameters,
99
} from 'mediasoup-client/types';
1010
import { SimulcastConfig } from 'common/config.interface';
1111

@@ -78,17 +78,18 @@ export class MediasoupClient {
7878
}
7979

8080
try {
81-
const encodings = simulcastConfigs?.map((config) => ({
82-
rid: config.rid,
83-
scaleResolutionDownBy: config.scaleResolutionDownBy,
84-
maxBitrate: config.maxBitRate,
85-
maxFramerate: config.maxFramerate,
86-
}));
87-
console.log('Producing video with encodings:', encodings);
88-
81+
// 原画不传递 maxBitrate 和 maxFramerate
82+
// const encodings = simulcastConfigs?.map((config) => ({
83+
// rid: config.rid,
84+
// scaleResolutionDownBy: config.scaleResolutionDownBy,
85+
// ...(config.rid !== 'original' && config.maxBitRate != null
86+
// ? { maxBitrate: config.maxBitRate }
87+
// : {}),
88+
// ...(config.maxFramerate != null ? { maxFramerate: config.maxFramerate } : {}),
89+
// }));
8990
const producer = await this.producerTransport.produce({
9091
track,
91-
...(encodings && encodings.length > 0 ? { encodings } : {}),
92+
// ...(encodings && encodings.length > 0 ? { encodings } : {}),
9293
appData: { classId }, // 传递 classId
9394
});
9495

0 commit comments

Comments
 (0)