Skip to content

Commit

Permalink
Implement overload of requestStreamingInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
SNWCreations committed Jul 4, 2024
1 parent 92a272b commit 835138d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<log4j2.version>2.19.0</log4j2.version>
<jkook.version>5549fc76</jkook.version>
<jkook.version>acac2d30</jkook.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mixin.version>0.12.4+mixin.0.8.5</mixin.version>
<asm.version>9.3</asm.version>
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/snw/kookbc/impl/entity/channel/VoiceChannelImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ public StreamingInfo requestStreamingInfo(@Nullable String password) {
return NORMAL_GSON.fromJson(res, StreamingInfoImpl.class);
}

@Override
public StreamingInfo requestStreamingInfo(@Nullable String password, boolean rtcpMux) {
final Map<String, ?> body = new MapBuilder()
.put("channel_id", getId())
.putIfNotNull("password", password)
.put("rtcp_mux", rtcpMux)
.build();
final JsonObject res = client.getNetworkClient().post(HttpAPIRoute.VOICE_JOIN.toFullURL(), body);
return NORMAL_GSON.fromJson(res, StreamingInfoImpl.class);
}

@Override
public StreamingInfo requestStreamingInfo(@Nullable String password, String audioSSRC, String audioPayloadType, boolean rtcpMux) {
final Map<String, ?> body = new MapBuilder()
Expand Down

0 comments on commit 835138d

Please sign in to comment.