# Server side stream on request for "loop until live"

**URL:** <https://community.wowza.com/t/server-side-stream-on-request-for-loop-until-live/55475>\
**Category:** Wowza Streaming Engine\
**Created:** [June 27, 2020, 2:31pm UTC](https://community.wowza.com/t/server-side-stream-on-request-for-loop-until-live/55475 "2020-06-27T14:31:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Rossi](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Daniel\_Rossi](https://community.wowza.com/u/Daniel_Rossi)\
**Post date:** [June 27, 2020, 2:31pm UTC](https://community.wowza.com/t/server-side-stream-on-request-for-loop-until-live/55475/1 "2020-06-27T14:31:29Z")

</div>

I’ve looked into this “loop until live” feature but its terribly over complicated, static and unsuitable. My way of thinking is somehow create a server side stream on request when a live stream isn’t published. so a HLS request has a VOD stream to play without returning a 404 if requesting the live stream name. And then on publish switch to the live stream in the playlist. No smil, no stream on startup.

Is this possible ? So on a HLS request, setup the Stream if it doesn’t exist. stream = Stream.createInstance(appInstance, streamName); Then when publishing switch to the live stream, with a key name of a postfix “-offline”.

Is it possible to do this in a stream resolving section so it doesn’t also return a 404 for HLS ?

---

<div class="post-metadata">

**Author:** ![Daniel\_Rossi](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Daniel\_Rossi](https://community.wowza.com/u/Daniel_Rossi)\
**Post date:** [June 28, 2020, 7:48pm UTC](https://community.wowza.com/t/server-side-stream-on-request-for-loop-until-live/55475/2 "2020-06-28T19:48:41Z")

</div>

I was able to come up with a way to startup a server stream on an initial HLS request. But switching streams HLS hangs. will make another follow up post.
