diff --git a/Doc/Release_Notes_EN-US.md b/Doc/Release_Notes_EN-US.md index f4a5fdf..4fd1c34 100644 --- a/Doc/Release_Notes_EN-US.md +++ b/Doc/Release_Notes_EN-US.md @@ -1,5 +1,14 @@ [中文文档](历史版本.md) +### Version 1.6.1 (2023-10.17) +Bug Fixes +- Fixed the problem of black screen when exiting the background and returning to the foreground +- Fixed an issue where startup parameters were not passed correctly when custom audio collection was turned on + +### Version 1.6.0 (2023-10.13) +Features +- Support for custom audio capture. + ### Version 1.5.1 (2023-9.20) Bug Fixes - Fix and optimize some known issues. diff --git "a/Doc/api350円257円246円347円273円206円350円257円264円346円230円216円346円226円207円346円241円243円/Classes/TCGGamePlayer.html" "b/Doc/api350円257円246円347円273円206円350円257円264円346円230円216円346円226円207円346円241円243円/Classes/TCGGamePlayer.html" index d6e58c3..35f1c99 100644 --- "a/Doc/api350円257円246円347円273円206円350円257円264円346円230円216円346円226円207円346円241円243円/Classes/TCGGamePlayer.html" +++ "b/Doc/api350円257円246円347円273円206円350円257円264円346円230円216円346円226円207円346円241円243円/Classes/TCGGamePlayer.html" @@ -97,6 +97,8 @@

+ + @@ -229,7 +231,14 @@

Parameters

params -

选填,预留暂未启用

+ +

选填,可选以下键值对:

+

- @"preferredCodec": 可选值为@"H264"或@"H265"。用于设置首选的编解码器,若值不是@"H264"或@"H265",则设置无效。如果设置了此字段,会话将尝试使用首选编解码器进行通信,如果首选编解码器不可用,则会使用其他可用的编解码器。如果未设置该字段或设置无效,则会话将使用默认的编解码器。

+

- @"local_audio": 可选值为bool类型。用于开启本地麦克风

+

- @"enableCustomAudioCapture":@{@"sampleRate":NSInteger, @"useStereoInput": BOOL},开启自定义音频采集,并带上自定义采集音频的采样率和通道数(两个参数都是必须的)。 +
e.g. @"enableCustomAudioCapture":@{@"sampleRate":@(48000), @"useStereoInput":@(true)}表示采样率为48000,双通道数据。 + 除此之外,要开启自定义音频采集,还需要设置@"local_audio"开启音频上行。

+ @@ -1105,7 +1114,74 @@

Declared In

-
+
+
+ +

– sendCustomAudioData:captureTimeNs +

+ +
+ + +
+ + +
+

发送自定义音频数据的音频数据。仅当开启了自定义音频采集时,此方法才有效。

+
+ + + +
- (BOOL)sendCustomAudioData:(NSData*_Nonnull)audioData captureTimeNs:(uint64_t)captureTimeNs
+ +
+

Return Value

+

发送自定义采集的音频数据是否成功

+
+ +
+

Parameters

+ + + + + + + + + + + +
audioData

包含音频数据的ByteBuffer。此缓冲区必须包含根据配置的音频格式的PCM数据(16位)。

captureTimeNs

音频数据的采集时间,以纳秒为单位。

+
+ + + + + + + +
+

Discussion

+

发送自定义音频数据的音频数据。仅当开启了自定义音频采集时,此方法才有效。

开启自定义音频采集的方式见initWithParams

+
+ + + + + + + +
+

Declared In

+

TCGGamePlayer.h

+
+ + +
+
+
+

– setVideoViewInsets:

diff --git "a/Doc/345円216円206円345円217円262円347円211円210円346円234円254円.md" "b/Doc/345円216円206円345円217円262円347円211円210円346円234円254円.md" index 2679738..895c561 100644 --- "a/Doc/345円216円206円345円217円262円347円211円210円346円234円254円.md" +++ "b/Doc/345円216円206円345円217円262円347円211円210円346円234円254円.md" @@ -1,5 +1,14 @@ [English document](Release_Notes_EN-US.md) +### Version 1.6.1 (2023-10.17) +Bug Fixes +- 修复退后台回到前台时黑屏问题 +- 修复开启自定义音频采集时启动参数未被正确传递的问题 + +### Version 1.6.0 (2023-10.13) +Features +- 新增支持自定义音频采集。 + ### Version 1.5.1 (2023-9.20) Bug Fixes - 修复和优化一些已知问题 diff --git a/SDK/TCGSDK.framework/Headers/TCGGamePlayer.h b/SDK/TCGSDK.framework/Headers/TCGGamePlayer.h index f8f5825..a2c5aec 100644 --- a/SDK/TCGSDK.framework/Headers/TCGGamePlayer.h +++ b/SDK/TCGSDK.framework/Headers/TCGGamePlayer.h @@ -141,6 +141,9 @@ * @param params 选填,可选以下键值对: * - @"preferredCodec": 可选值为@"H264"或@"H265"。用于设置首选的编解码器,若值不是@"H264"或@"H265",则设置无效。如果设置了此字段,会话将尝试使用首选编解码器进行通信,如果首选编解码器不可用,则会使用其他可用的编解码器。如果未设置该字段或设置无效,则会话将使用默认的编解码器。 * - @"local_audio": 可选值为bool类型。用于开启本地麦克风 + * - @"enableCustomAudioCapture":@{@"sampleRate":NSInteger, @"useStereoInput": BOOL},开启自定义音频采集,并带上自定义采集音频的采样率和通道数(两个参数都是必须的)。 + * e.g. @"enableCustomAudioCapture":@{@"sampleRate":@(48000), @"useStereoInput":@(true)}表示采样率为48000,双通道数据。 + * 除此之外,要开启自定义音频采集,还需要设置@"local_audio"开启音频上行。 * * @param listener 必填,player的代理,监听关键事件的回调 */ @@ -194,7 +197,7 @@ - (void)setEnableLocalAudio:(BOOL)enable; /*! - * 设置连接超时时长,在连接开始前设置才有效,默认10秒 + * 设置连接超时时长,在连接开始前设置才有效,默认20秒 * @param timeout 设置从连接远端开始到出画面的超时时长 */ - (void)setConnectTimeout:(NSTimeInterval)timeout; @@ -274,6 +277,16 @@ */ - (void)setAudioSink:(id)audioSink enableInternalPlaying:(BOOL)enable; +/** + * 发送自定义音频数据的音频数据。仅当开启了自定义音频采集时,此方法才有效。 + * 开启自定义音频采集的方式见initWithParams + * + * @param audioData 包含音频数据的ByteBuffer。此缓冲区必须包含根据配置的音频格式的PCM数据(16位)。 + * @param captureTimeNs 音频数据的采集时间,以纳秒为单位。 + * @return 发送自定义采集的音频数据是否成功 + */ +- (BOOL)sendCustomAudioData:(NSData*_Nonnull)audioData captureTimeNs:(uint64_t)captureTimeNs; + /*! * 设置sdk audioSession代理,实现并通过addTCGAudioSessionDelegate后。sdk中将不再操作AudioSession,而是将AudioSession相关操作通过该代理回调到APP * 处理,APP根据实际需要根据参数对AVAudioSession进行设置。 diff --git a/SDK/TCGSDK.framework/PrivacyInfo.xcprivacy b/SDK/TCGSDK.framework/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..36a611c --- /dev/null +++ b/SDK/TCGSDK.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,17 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + + + diff --git a/SDK/TCGSDK.framework/TCGSDK b/SDK/TCGSDK.framework/TCGSDK index 029066f..46fa8bc 100755 Binary files a/SDK/TCGSDK.framework/TCGSDK and b/SDK/TCGSDK.framework/TCGSDK differ diff --git a/SDK/TWEBRTC.framework/Headers/RTCAudioDeviceModule.h b/SDK/TWEBRTC.framework/Headers/RTCAudioDeviceModule.h new file mode 100644 index 0000000..b391d21 --- /dev/null +++ b/SDK/TWEBRTC.framework/Headers/RTCAudioDeviceModule.h @@ -0,0 +1,16 @@ +#import +#import "RTCMacros.h" + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTCAudioDeviceModule : NSObject + +- (instancetype)initWithEnableCustomAudioCapture:(BOOL)enableCustomAudioCapture; + +/** Send custom audio data */ +- (bool)sendCustomAudioData:(NSData *)audioBuffer timestampNs:(uint64_t)timestampNs; + +@end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/SDK/TWEBRTC.framework/Headers/RTCPeerConnectionFactory.h b/SDK/TWEBRTC.framework/Headers/RTCPeerConnectionFactory.h index d468f8a..beccdc7 100644 --- a/SDK/TWEBRTC.framework/Headers/RTCPeerConnectionFactory.h +++ b/SDK/TWEBRTC.framework/Headers/RTCPeerConnectionFactory.h @@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @class RTCVideoSource; @class RTCVideoTrack; @class RTCPeerConnectionFactoryOptions; +@class RTCAudioDeviceModule; @protocol RTCPeerConnectionDelegate; @protocol RTCVideoDecoderFactory; @protocol RTCVideoEncoderFactory; @@ -41,6 +42,11 @@ RTC_OBJC_EXPORT - (instancetype)initWithEncoderFactory:(nullable id)encoderFactory decoderFactory:(nullable id)decoderFactory; +/* Initialize object with injectable video encoder/decoder factories, and enable custom audio capture. */ +- (instancetype)initWithEncoderFactory:(nullable id)encoderFactory + decoderFactory:(nullable id)decoderFactory + audioDeviceModule:(RTCAudioDeviceModule *)audioDeviceModule; + /** Initialize an RTCAudioSource with constraints. */ - (RTCAudioSource *)audioSourceWithConstraints:(nullable RTCMediaConstraints *)constraints; diff --git a/SDK/TWEBRTC.framework/Headers/TWEBRTC.h b/SDK/TWEBRTC.framework/Headers/TWEBRTC.h index 1303526..3f3b10d 100644 --- a/SDK/TWEBRTC.framework/Headers/TWEBRTC.h +++ b/SDK/TWEBRTC.framework/Headers/TWEBRTC.h @@ -1,5 +1,5 @@ /* - * Copyright 2023 The WebRTC project authors. All Rights Reserved. + * Copyright 2024 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -48,6 +48,7 @@ #import #import #import +#import #import #import #import diff --git a/SDK/TWEBRTC.framework/TWEBRTC b/SDK/TWEBRTC.framework/TWEBRTC index b1d3835..2e43820 100755 Binary files a/SDK/TWEBRTC.framework/TWEBRTC and b/SDK/TWEBRTC.framework/TWEBRTC differ diff --git a/TCGSDK.podspec b/TCGSDK.podspec index 4ac7cd7..4673d7f 100644 --- a/TCGSDK.podspec +++ b/TCGSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'TCGSDK' - spec.version = '1.5.1' + spec.version = '1.6.17' spec.license = { :type => 'MIT' } spec.homepage = 'https://github.com/tencentyun/cloudgame-ios-sdk' spec.summary = 'Tencent Cloud Gaming Software Development Kit for iOS.'

AltStyle によって変換されたページ (->オリジナル) /