Skip to content

Commit ef0c92d

Browse files
committed
fix: resolve streaming mute parameter configuration issue
- Update version to 4.0.12 - Remove deprecated linear zoom methods from Camera2Manager and NodePublisher - Make setVolume method public to properly expose mute functionality - Update native libraries with latest fixes - Update changelog and documentation with new version details
1 parent 7c1ef82 commit ef0c92d

9 files changed

Lines changed: 8 additions & 49 deletions

File tree

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.0.12 - 2026-01-02
2+
修复推流静音参数设置问题
3+
14
## 4.0.10 - 2025-12-15
25
更准确的推流时间戳对齐
36

NodeMediaClient/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
defaultConfig {
99
minSdkVersion 21
1010
targetSdkVersion 33
11-
versionCode 40011
12-
versionName "4.0.11"
11+
versionCode 40012
12+
versionName "4.0.12"
1313
}
1414

1515
buildTypes {
@@ -33,7 +33,7 @@ afterEvaluate {
3333
from components.release
3434
groupId = 'com.github.NodeMedia'
3535
artifactId = 'NodeMediaClient-Android'
36-
version = '4.0.11'
36+
version = '4.0.12'
3737
}
3838
}
3939
}

NodeMediaClient/src/main/java/cn/nodemedia/Camera2Manager.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -343,32 +343,6 @@ public void setZoomRatio(float ratio) {
343343
}
344344
}
345345

346-
/**
347-
* 获取当前线性变焦值 (0.0 - 1.0)
348-
*/
349-
public float getLinearZoom() {
350-
float minZoom = getMinZoomRatio();
351-
float maxZoom = getMaxZoomRatio();
352-
return (currentZoomRatio - minZoom) / (maxZoom - minZoom);
353-
}
354-
355-
/**
356-
* 设置线性变焦值 (0.0 - 1.0)
357-
*/
358-
public void setLinearZoom(float zoom) {
359-
if (zoom < 0.0f) {
360-
zoom = 0.0f;
361-
} else if (zoom > 1.0f) {
362-
zoom = 1.0f;
363-
}
364-
365-
float minZoom = getMinZoomRatio();
366-
float maxZoom = getMaxZoomRatio();
367-
float targetRatio = minZoom + zoom * (maxZoom - minZoom);
368-
369-
setZoomRatio(targetRatio);
370-
}
371-
372346
/**
373347
* 检查是否支持闪光灯
374348
*/

NodeMediaClient/src/main/java/cn/nodemedia/NodePublisher.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -204,35 +204,17 @@ public float getZoomRatio() {
204204
}
205205
return 1.0f;
206206
}
207-
208-
public float getLinearZoom() {
209-
if (camera2Manager != null) {
210-
return camera2Manager.getLinearZoom();
211-
}
212-
return 0.0f;
213-
}
214-
215207
public void setRoomRatio(float ratio) {
216208
if (camera2Manager != null) {
217209
camera2Manager.setZoomRatio(ratio);
218210
}
219211
}
220-
221-
public void setLinearZoom(float zoom) {
222-
if (camera2Manager != null) {
223-
camera2Manager.setLinearZoom(zoom);
224-
}
225-
}
226-
227212
public void enableTorch(boolean enable) {
228213
if (camera2Manager != null) {
229214
camera2Manager.enableTorch(enable);
230215
}
231216
}
232217

233-
/**
234-
* 检查是否支持闪光灯
235-
*/
236218
public boolean isFlashAvailable() {
237219
if (camera2Manager != null) {
238220
return camera2Manager.isFlashAvailable();
@@ -286,7 +268,7 @@ protected void finalize() throws Throwable {
286268

287269
public native void setCryptoKey(String cryptoKey);
288270

289-
native void setVolume(float volume);
271+
public native void setVolume(float volume);
290272

291273
public native void setEffectParameter(String parameter, float value);
292274

128 Bytes
Binary file not shown.
64 Bytes
Binary file not shown.
128 Bytes
Binary file not shown.
80 Bytes
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencyResolutionManagement {
4444
### 2. Add the dependency
4545
```
4646
dependencies {
47-
implementation 'com.github.NodeMedia:NodeMediaClient-Android:4.0.11'
47+
implementation 'com.github.NodeMedia:NodeMediaClient-Android:4.0.12'
4848
}
4949
```
5050

0 commit comments

Comments
 (0)