# substitution stream

**URL:** https://community.wowza.com/t/substitution-stream/38024
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [April 25, 2016, 6:39pm UTC](https://community.wowza.com/t/substitution-stream/38024 "2016-04-25T18:39:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alexey\_Zaberezhniy](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Alexey\_Zaberezhniy](https://community.wowza.com/u/Alexey_Zaberezhniy)
#### Post date: [April 25, 2016, 6:39pm UTC](https://community.wowza.com/t/substitution-stream/38024/1 "2016-04-25T18:39:43Z")

</div>

hi

i write custom module for HTTP stremer

I want to check incoming parametrs like for example refere and if refere is wrong send to client special advert URL… for now i get needed parametrs (String referrer = httpSession.getReferrer(); )

and now a must create another URL for client how can i do it ?

I try to use httpSession.setStreamName(“adv.stream”);

but in log i still see HTTPStreamerAdapterCupertinoStreamer.onPlaylist: Stream not found [live/_definst_/TLC\_360p.stream/playlist.m3u8?1111111111222222222]: TLC\_360p.stream -

many thanks !

---

<div class="post-metadata">

### Author: ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)
#### Post date: [May 11, 2016, 8:15pm UTC](https://community.wowza.com/t/substitution-stream/38024/2 "2016-05-11T20:15:16Z")

</div>

Hi,

It sounds like you are trying to connect a playback request to a different stream name? For example, if a client request URL is for http://:1935/live/TLC/playlist.m3u8, and if the referrer passes your check, then the client should then playback http://:1935/live/adv.stream/playlist.m3u8. If so, you can use the [IMediaStreamNameAliasProvider2 interface](https://www.wowza.com/docs/how-to-use-the-imediastreamnamealiasprovider2-interface) to alias the playback URL.

Michelle
