# Play on-hold stream for a specific user and then switch them to another stream

**URL:** <https://community.wowza.com/t/play-on-hold-stream-for-a-specific-user-and-then-switch-them-to-another-stream/45969>\
**Category:** Wowza Streaming Engine\
**Created:** [September 17, 2015, 8:01pm UTC](https://community.wowza.com/t/play-on-hold-stream-for-a-specific-user-and-then-switch-them-to-another-stream/45969 "2015-09-17T20:01:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konrad\_Reiche](https://avatars.discourse-cdn.com/v4/letter/k/f17d59/32.png) [@Konrad\_Reiche](https://community.wowza.com/u/Konrad_Reiche)\
**Post date:** [September 17, 2015, 8:01pm UTC](https://community.wowza.com/t/play-on-hold-stream-for-a-specific-user-and-then-switch-them-to-another-stream/45969/1 "2015-09-17T20:01:45Z")

</div>

When a user connects it hits _resolvePlayAlias_ where _MediaCasterStream_ is started and a _Stream_ instance is set up for the very first listener. For all subsequent listeners a new media caster stream does not have to be started as long as it is the same stream name, but what if I want to play to some specific users a on-hold stream, for let’s say a couple of seconds before switching them to the actual stream. Is that possible?

Changing the current stream would, and correct me if I am wrong, change the stream for every listener. So how could I achieve something like that? I am aware that I could return a different stream in _resolveStreamAlias_, but how do I switch that user/listener then back?

Konrad

---

<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:** [September 20, 2015, 10:29am UTC](https://community.wowza.com/t/play-on-hold-stream-for-a-specific-user-and-then-switch-them-to-another-stream/45969/2 "2015-09-20T10:29:34Z")

</div>

Hello there and welcome to the Wowza support forum.

Take a look at these Stream Class examples for use as a starting place for your needs:

[How to switch streams using Stream class streams](https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams)

[How to do basic server-side publishing with Stream class streams](https://www.wowza.com/docs/how-to-do-basic-server-side-publishing-with-stream-class-streams)

[How to control Stream class streams dynamically (ModuleStreamControl)](https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol%28ModuleStreamControl%29)

Regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![Konrad\_Reiche](https://avatars.discourse-cdn.com/v4/letter/k/f17d59/32.png) [@Konrad\_Reiche](https://community.wowza.com/u/Konrad_Reiche)\
**Post date:** [September 20, 2015, 5:25pm UTC](https://community.wowza.com/t/play-on-hold-stream-for-a-specific-user-and-then-switch-them-to-another-stream/45969/3 "2015-09-20T17:25:27Z")

</div>

Hello salvadore,

thanks so much for taking the time to reply. I have worked through the linked guides. I think what I am looking for is something like a pre-roll stream, which will be played uniquely for a new listener. I have read contradicting statements so far, a) that something like that is not implemented yet on Wowza and b) tutorials like these here, were I am not certain if that’s what I want: [https://www.wowza.com/docs/how-to-insert-a-pre-roll-or-mid-roll-for-video-on-demand-playback-in-flash-rtmp-client](https://www.wowza.com/docs/how-to-insert-a-pre-roll-or-mid-roll-for-video-on-demand-playback-in-flash-rtmp-client) Is a VHost required?
