# Switch stream on connected client

**URL:** <https://community.wowza.com/t/switch-stream-on-connected-client/46423>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [December 28, 2015, 2:59pm UTC](https://community.wowza.com/t/switch-stream-on-connected-client/46423 "2015-12-28T14:59:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogy\_rahmawan](https://avatars.discourse-cdn.com/v4/letter/y/9d8465/32.png) [@yogy\_rahmawan](https://community.wowza.com/u/yogy_rahmawan)\
**Post date:** [December 28, 2015, 2:59pm UTC](https://community.wowza.com/t/switch-stream-on-connected-client/46423/1 "2015-12-28T14:59:16Z")

</div>

Hi,

Here is the scenario :

1. Client A and Client B connected to stream `sample.mp4`

2. I have watermark detector application. If watermark detector detect specific watermark on `sample.mp4`. It will tell wowza to switch from `sample.mp4` to `advertising.mp4`. And the result, All connected clients(client A and client B) will switch to `advertising.mp4`.

The questions are How to tell all connected clients to switch from `sample.mp4` to `advertising.mp4`?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [December 28, 2015, 7:33am UTC](https://community.wowza.com/t/switch-stream-on-connected-client/46423/2 "2015-12-28T07:33:04Z")

</div>

Hello there and welcome to the Wowza support forum.

You can use this example code as a starting place. You will need to provide the logic for when to switch the stream:

[How to override play to remap a stream name](https://www.wowza.com/docs/how-to-override-play-to-remap-a-stream-name)

You will need to build this module in the [Wowza IDE](https://www.wowza.com/resources/developers)

If you need help getting this working, you might consider posting to the [find a consultant forum](http://community.wowza.com/c/-/7)

regards,

salvadore

---

<div class="post-metadata">

**Author:** ![Gustavo\_Villegas](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Gustavo\_Villegas](https://community.wowza.com/u/Gustavo_Villegas)\
**Post date:** [March 4, 2019, 7:05pm UTC](https://community.wowza.com/t/switch-stream-on-connected-client/46423/3 "2019-03-04T19:05:54Z")

</div>

Hi there … I found your old post … I’m looking for an option to detect a watermark to trigger an event

What is the watermark detection tool you were using at the time you wrote this post?
