From 40cddbd87a37c5265d34f590ff9a9a5e933934d1 Mon Sep 17 00:00:00 2001 From: tonychan Date: Thu, 20 Apr 2023 09:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A4=96=E9=83=A8=E6=8E=A8?= =?UTF-8?q?=E6=B5=81=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5ac073ed045dfab395c9c3841f64479e1eded11f --- ...4\207\345\274\225\346\226\207\346\241\243.md" | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git "a/Source/SDK/LinkVideo/doc/iOS Video\346\216\245\345\205\245\346\214\207\345\274\225\346\226\207\346\241\243.md" "b/Source/SDK/LinkVideo/doc/iOS Video\346\216\245\345\205\245\346\214\207\345\274\225\346\226\207\346\241\243.md" index 6773ac4b6..bc413e454 100644 --- "a/Source/SDK/LinkVideo/doc/iOS Video\346\216\245\345\205\245\346\214\207\345\274\225\346\226\207\346\241\243.md" +++ "b/Source/SDK/LinkVideo/doc/iOS Video\346\216\245\345\205\245\346\214\207\345\274\225\346\226\207\346\241\243.md" @@ -184,18 +184,28 @@ [self.player prepareToPlay]; [self.player play]; ``` - [示例代码](https://github.com/tencentyun/iot-link-ios/blob/master/Source/LinkSDKDemo/Home/Controllers/Device/TIoTPlayMovieVC.m) + [示例代码](https://github.com/tencentyun/iot-link-ios/blob/master/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoCallVC.m) * 发送语音对讲数据 ``` //开始对讲 - [[TIoTCoreXP2PBridge sharedInstance] sendVoiceToServer:dev_name]; + TIoTCoreAudioConfig *audio_config = [TIoTCoreAudioConfig new]; + audio_config.isExternal = YES; + TIoTCoreVideoConfig *video_config = [TIoTCoreVideoConfig new]; + video_config.isExternal = YES; + [[TIoTCoreXP2PBridge sharedInstance] sendVoiceToServer:dev_name channel:nil audioConfig:audio_config videoConfig:video_config]]; + + // 发布外部视频数据(自定义采集,自定义编码,h264数据) + - (void)SendExternalVideoPacket:(NSData *)videoPacket; + // 发布外部视频数据(自定义采集,自定义编码,aac数据) + - (void)SendExternalAudioPacket:(NSData *)audioPacket; + //结束对讲 [[TIoTCoreXP2PBridge sharedInstance] stopVoiceToServer]; ``` - [示例代码](https://github.com/tencentyun/iot-link-ios/blob/master/Source/LinkSDKDemo/Home/Controllers/Device/TIoTPlayMovieVC.m) + [示例代码](https://github.com/tencentyun/iot-link-ios/blob/master/Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoCallVC.m) * P2P通道传输自定义数据