@@ -209,6 +209,9 @@ class FusionCDNHost: BaseViewController {
209209 rtcSwitcher. isEnabled = false
210210 streamingButton. setTitle ( " Start Live Streaming " , for: . normal)
211211 streamingButton. setTitleColor ( . blue, for: . normal)
212+ agoraKit. stopDirectCdnStreaming ( )
213+ agoraKit. stopRtmpStream ( streamingUrl)
214+ agoraKit. removePublishStreamUrl ( streamingUrl)
212215 }
213216
214217 @IBAction func setRtcStreaming( _ sender: UISwitch ) {
@@ -355,7 +358,7 @@ class FusionCDNAudience: BaseViewController {
355358 guard let mode = configs [ " mode " ] as? StreamingMode else { return }
356359 guard let channelName = configs [ " channelName " ] as? String else { return }
357360 if mode == . agoraChannel {
358- streamingUrl = " rtmp://mdetest2.pull.agoramde. agoraio.cn/live / \( channelName) "
361+ streamingUrl = " rtmp://push.webdemo. agoraio.cn/lbhd / \( channelName) "
359362 rtcSwitcher. isEnabled = false
360363 let ret = mediaPlayerKit. open ( withAgoraCDNSrc: streamingUrl, startPos: 0 )
361364 print ( ret)
@@ -545,7 +548,7 @@ extension FusionCDNHost: AgoraRtcEngineDelegate {
545548 }
546549
547550 func rtcEngine( _ engine: AgoraRtcEngineKit , rtmpStreamingChangedToState url: String , state: AgoraRtmpStreamingState , errCode: AgoraRtmpStreamingErrorCode ) {
548- self . showAlert ( message: " On rtmpStreamingChangedToState, state: \( state. rawValue) , errCode: \( errCode. rawValue) " )
551+ LogUtils . log ( message: " On rtmpStreamingChangedToState, state: \( state. rawValue) , errCode: \( errCode. rawValue) " , level : . info )
549552 }
550553
551554 func rtcEngine( _ engine: AgoraRtcEngineKit , streamUnpublishedWithUrl url: String ) {
0 commit comments