# NetStream Loop?

**URL:** <https://qa.fmod.com/t/netstream-loop/15101>\
**Category:** FMOD Engine\
**Created:** [October 4, 2019, 3:03am UTC](https://qa.fmod.com/t/netstream-loop/15101 "2019-10-04T03:03:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![breakerror](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@breakerror](https://qa.fmod.com/u/breakerror)\
**Post date:** [October 4, 2019, 3:03am UTC](https://qa.fmod.com/t/netstream-loop/15101/1 "2019-10-04T03:03:33Z")

</div>

Due to special reasons, our project requires netstream audio can play on loop . Can you add an attribute to the “ **Sound** ” object to indicate whether Cache needs to be stored or not, and if Cache is stored, the loop can be played after the end?

This attribute is very important to our project. Simulating loop playback through multiple Sound objects is not friendly to network traffic.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [October 7, 2019, 7:41am UTC](https://qa.fmod.com/t/netstream-loop/15101/2 "2019-10-07T07:41:17Z")

</div>

you can loop a http netstream by simply adding FMOD\_LOOP\_NORMAL to the createStream flags. (and the server has to support http seeking)

---

<div class="post-metadata">

**Author:** ![breakerror](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@breakerror](https://qa.fmod.com/u/breakerror)\
**Post date:** [October 8, 2019, 2:01am UTC](https://qa.fmod.com/t/netstream-loop/15101/3 "2019-10-08T02:01:16Z")

</div>

However, I found that many CDN do not support HTTP seeking, and depending on the server’s attributes may not be a good choice. Can you cache data on the client side again, so that the data cache can be played circularly after completion?

---

<div class="post-metadata">

**Author:** ![breakerror](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@breakerror](https://qa.fmod.com/u/breakerror)\
**Post date:** [October 8, 2019, 2:03am UTC](https://qa.fmod.com/t/netstream-loop/15101/4 "2019-10-08T02:03:31Z")

</div>

Is Http Seeking meas http “chunk” transmission ?

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [October 8, 2019, 2:33am UTC](https://qa.fmod.com/t/netstream-loop/15101/5 "2019-10-08T02:33:01Z")

</div>

the feature we rely on to seek is  
“Accept-Ranges: bytes” used with “Range: bytes=start-len”, but looping back to the start is pretty much just closing and restarting the netstream (which is what fmod does internally), but we go further and allow seeking inside the stream.

---

<div class="post-metadata">

**Author:** ![breakerror](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@breakerror](https://qa.fmod.com/u/breakerror)\
**Post date:** [October 8, 2019, 3:44am UTC](https://qa.fmod.com/t/netstream-loop/15101/6 "2019-10-08T03:44:28Z")

</div>

I have tried, the current CND does not seem to support

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [October 8, 2019, 7:21am UTC](https://qa.fmod.com/t/netstream-loop/15101/7 "2019-10-08T07:21:12Z")

</div>

if you have a public url i could try it and see what headers come through

---

<div class="post-metadata">

**Author:** ![breakerror](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@breakerror](https://qa.fmod.com/u/breakerror)\
**Post date:** [October 8, 2019, 7:36am UTC](https://qa.fmod.com/t/netstream-loop/15101/8 "2019-10-08T07:36:56Z")

</div>

[[http://music.163.com/song/media/outer/url?id=30148444.mp3](http://music.163.com/song/media/outer/url?id=30148444.mp3)]

like this link music, I play loop fail.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [March 10, 2020, 4:24am UTC](https://qa.fmod.com/t/netstream-loop/15101/9 "2020-03-10T04:24:58Z")

</div>

This stream is missing the “Accept-Ranges: bytes” http header, so seeking will not work.
