# Audio stops streaming when another stream begins playing

**URL:** https://community.wowza.com/t/audio-stops-streaming-when-another-stream-begins-playing/55761
**Category:** Wowza GoCoder SDK
**Created:** [August 24, 2020, 6:31pm UTC](https://community.wowza.com/t/audio-stops-streaming-when-another-stream-begins-playing/55761 "2020-08-24T18:31:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nobody\_Nobody](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@Nobody\_Nobody](https://community.wowza.com/u/Nobody_Nobody)
#### Post date: [August 24, 2020, 6:31pm UTC](https://community.wowza.com/t/audio-stops-streaming-when-another-stream-begins-playing/55761/1 "2020-08-24T18:31:32Z")

</div>

I am using Wowza GoCoder SDK in an iOS app.

In the app, I need to broadcast a live stream as well as play another stream at the same time.

I have observed that live streaming works correctly when the other stream is not played.

However, when the other stream starts playing, the audio stops broadcasting.

Can anyone point out how to fix this issue so that audio can be streamed while another stream is being played?

---

<div class="post-metadata">

### Author: ![Amara\_Graham](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/amara_graham/32/381_2.png) [@Amara\_Graham](https://community.wowza.com/u/Amara_Graham)
#### Post date: [August 25, 2020, 10:18pm UTC](https://community.wowza.com/t/audio-stops-streaming-when-another-stream-begins-playing/55761/2 "2020-08-25T22:18:36Z")

</div>

Hi There,

I recommend submitting a support ticket for issues with the Wowza GoCoder SDK - [https://www.wowza.com/support/open-ticket](https://www.wowza.com/support/open-ticket)

Please keep in mind we have announced an end of life plan for the Wowza GoCoder SDK. You can read more about that here - [https://www.wowza.com/community/articles/55594/attn-important-wowza-player-wowza-gocoder-sdk-ull.html](https://www.wowza.com/community/articles/55594/attn-important-wowza-player-wowza-gocoder-sdk-ull.html)

---

<div class="post-metadata">

### Author: ![Nobody\_Nobody](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@Nobody\_Nobody](https://community.wowza.com/u/Nobody_Nobody)
#### Post date: [August 26, 2020, 6:33pm UTC](https://community.wowza.com/t/audio-stops-streaming-when-another-stream-begins-playing/55761/3 "2020-08-26T18:33:46Z")

</div>

I was able to solve this problem by setting the category on “AVAudioSession” to “.playAndRecord”.

```auto
var player = WOWZPlayer()

func play() {
    // ...
    self.player.play(config, callback: self)
    // the following lines fix the issue
    do {
        try AVAudioSession.sharedInstance().setCategory(.playAndRecord)
    } catch {
        print("error", error)
    }
}

```
