Skip to content

Commit 83aacb2

Browse files
author
xianing
committed
fix issues
1 parent 0098a3e commit 83aacb2

14 files changed

Lines changed: 27 additions & 33 deletions

File tree

iOS/APIExample/Base.lproj/Main.storyboard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
</subviews>
184184
<constraints>
185185
<constraint firstItem="GRE-S2-EUw" firstAttribute="width" secondItem="cYL-o5-ebi" secondAttribute="width" multiplier="0.15" id="B5l-gH-dhE"/>
186-
<constraint firstAttribute="height" constant="44" id="c0j-DH-fPL"/>
186+
<constraint firstAttribute="height" priority="999" constant="44" id="c0j-DH-fPL"/>
187187
<constraint firstItem="Ruy-K9-CLg" firstAttribute="width" secondItem="cYL-o5-ebi" secondAttribute="width" multiplier="0.35" id="pMs-SJ-oXs"/>
188188
<constraint firstItem="Fzj-1c-MVz" firstAttribute="width" secondItem="cYL-o5-ebi" secondAttribute="width" multiplier="0.5" id="tT5-Kt-BTm"/>
189189
</constraints>
@@ -213,7 +213,7 @@
213213
<rect key="frame" x="20" y="5" width="374" height="44.5"/>
214214
<subviews>
215215
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GJJ-sr-QDR">
216-
<rect key="frame" x="0.0" y="0.0" width="131" height="44.5"/>
216+
<rect key="frame" x="0.0" y="0.0" width="318" height="44.5"/>
217217
<fontDescription key="fontDescription" type="system" pointSize="15"/>
218218
<nil key="textColor"/>
219219
<nil key="highlightedColor"/>
@@ -227,8 +227,8 @@
227227
</subviews>
228228
<constraints>
229229
<constraint firstItem="fY0-HR-SHv" firstAttribute="width" secondItem="W1s-a2-XkF" secondAttribute="width" multiplier="0.15" id="2f7-u5-57I"/>
230-
<constraint firstItem="GJJ-sr-QDR" firstAttribute="width" secondItem="W1s-a2-XkF" secondAttribute="width" multiplier="0.35" id="Zaw-Vn-J7y"/>
231-
<constraint firstAttribute="height" constant="44" id="qVS-vl-t2H"/>
230+
<constraint firstItem="GJJ-sr-QDR" firstAttribute="width" secondItem="W1s-a2-XkF" secondAttribute="width" multiplier="0.35" priority="999" id="Zaw-Vn-J7y"/>
231+
<constraint firstAttribute="height" priority="999" constant="44" id="qVS-vl-t2H"/>
232232
</constraints>
233233
</stackView>
234234
</subviews>
@@ -268,7 +268,7 @@
268268
</button>
269269
</subviews>
270270
<constraints>
271-
<constraint firstAttribute="height" constant="44" id="6gA-Lm-Crq"/>
271+
<constraint firstAttribute="height" priority="999" constant="44" id="6gA-Lm-Crq"/>
272272
<constraint firstItem="2VP-yo-86d" firstAttribute="width" secondItem="ZHl-od-T2h" secondAttribute="width" multiplier="0.35" id="SjX-ki-B0v"/>
273273
</constraints>
274274
</stackView>

iOS/APIExample/Examples/Advanced/CustomAudioRender/CustomAudioRender.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,12 @@ class CustomAudioRenderMain: BaseViewController {
6666
// Set audio route to speaker
6767
agoraKit.setDefaultAudioRouteToSpeakerphone(true)
6868

69-
// TODO
7069
// setup external audio source
7170
exAudio.setupExternalAudio(withAgoraKit: agoraKit, sampleRate: UInt32(sampleRate), channels: UInt32(channel), audioCRMode: .sdkCaptureExterRender, ioType: .remoteIO)
7271
// important!! this example is using onPlaybackAudioFrame to do custom rendering
7372
// by default the audio output will still be processed by SDK hence below api call is mandatory to disable that behavior
7473
agoraKit.adjustPlaybackSignalVolume(0)
7574
agoraKit.setPlaybackAudioFrameParametersWithSampleRate(Int(sampleRate), channel: Int(channel), mode: .readOnly, samplesPerCall: Int(sampleRate*channel)/100)
76-
// agoraKit.setParameters("{\"che.audio.external_render\": false}")
77-
78-
7975

8076
// start joining channel
8177
// 1. Users can only see each other after they join the
@@ -87,18 +83,6 @@ class CustomAudioRenderMain: BaseViewController {
8783
option.clientRoleType = .of((Int32)(AgoraClientRole.broadcaster.rawValue))
8884

8985
let result = agoraKit.joinChannel(byToken: KeyCenter.Token, channelId: channelName, uid: 0, mediaOptions: option)
90-
// let result = agoraKit.joinChannel(byToken: nil, channelId: channelName, info: nil, uid: 0) {[unowned self] (channel, uid, elapsed) -> Void in
91-
// self.isJoined = true
92-
// LogUtils.log(message: "Join \(channel) with uid \(uid) elapsed \(elapsed)ms", level: .info)
93-
//
94-
// self.exAudio.startWork()
95-
//
96-
// //set up local audio view, this view will not show video but just a placeholder
97-
// let view = Bundle.loadView(fromNib: "VideoView", withType: VideoView.self)
98-
// self.audioViews[uid] = view
99-
// view.setPlaceholder(text: self.getAudioLabel(uid: uid, isLocal: true))
100-
// self.container.layoutStream3x3(views: Array(self.audioViews.values))
101-
// }
10286
if result != 0 {
10387
// Usually happens with invalid parameters
10488
// Error code description can be found at:

iOS/APIExample/Examples/Advanced/CustomVideoRender/CustomVideoRender.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// CustomVideoRender.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/CustomVideoSourcePush/CustomVideoSourcePush.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// CustomVideoSourcePush.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.
@@ -208,6 +208,16 @@ extension CustomVideoSourcePushMain: AgoraRtcEngineDelegate {
208208
extension CustomVideoSourcePushMain:AgoraCameraSourcePushDelegate {
209209
func myVideoCapture(_ capture: AgoraCameraSourcePush, didOutputSampleBuffer pixelBuffer: CVPixelBuffer, rotation: Int, timeStamp: CMTime) {
210210
let videoFrame = AgoraVideoFrame()
211+
/** Video format:
212+
* - 1: I420
213+
* - 2: BGRA
214+
* - 3: NV21
215+
* - 4: RGBA
216+
* - 5: IMC2
217+
* - 7: ARGB
218+
* - 8: NV12
219+
* - 12: iOS texture (CVPixelBufferRef)
220+
*/
211221
videoFrame.format = 12
212222
videoFrame.textureBuf = pixelBuffer
213223
videoFrame.time = timeStamp

iOS/APIExample/Examples/Advanced/JoinMultiChannel/JoinMultiChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// JoinMultiChannel.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/MediaChannelRelay/MediaChannelRelay.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// MediaChannelRelay.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/MediaPlayer/MediaPlayer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// MediaPlayer.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/PrecallTest/PrecallTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// PrecallTest.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/QuickSwitchChannel/QuickSwitchChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// QuickSwitchChannel.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

iOS/APIExample/Examples/Advanced/RTMPStreaming/RTMPStreaming.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// JoinChannelVC.swift
2+
// RTMPStreaming.swift
33
// APIExample
44
//
55
// Created by 张乾泽 on 2020/4/17.

0 commit comments

Comments
 (0)