# Trying to implement local video while network goes off

**URL:** <https://community.wowza.com/t/trying-to-implement-local-video-while-network-goes-off/54714>\
**Category:** Wowza GoCoder SDK\
**Tags:** media-players-and-devices\
**Created:** [February 27, 2020, 1:36pm UTC](https://community.wowza.com/t/trying-to-implement-local-video-while-network-goes-off/54714 "2020-02-27T13:36:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilesh\_Gangadhar](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@Nilesh\_Gangadhar](https://community.wowza.com/u/Nilesh_Gangadhar)\
**Post date:** [February 27, 2020, 1:36pm UTC](https://community.wowza.com/t/trying-to-implement-local-video-while-network-goes-off/54714/1 "2020-02-27T13:36:31Z")

</div>

We are trying to implement local video while network goes off in between live streaming but MediaRecorder throwing illegalStateException when mediaRecorder.start() method

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [February 27, 2020, 3:40pm UTC](https://community.wowza.com/t/trying-to-implement-local-video-while-network-goes-off/54714/2 "2020-02-27T15:40:08Z")

</div>

Have you considered using this Wowza Loop A Pre-roll module for switching to an mp4 when the network crashes or when the encoder for the live source disconnects? When the encoder reconnects with a live source, it switches from the mp4 back to the live streaming.

[https://www.wowza.com/blog/loop-a-pre-roll-until-a-live-stream-starts](https://www.wowza.com/blog/loop-a-pre-roll-until-a-live-stream-starts)

---

<div class="post-metadata">

**Author:** ![Nilesh\_Gangadhar](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@Nilesh\_Gangadhar](https://community.wowza.com/u/Nilesh_Gangadhar)\
**Post date:** [February 28, 2020, 5:59am UTC](https://community.wowza.com/t/trying-to-implement-local-video-while-network-goes-off/54714/3 "2020-02-28T05:59:11Z")

</div>

Thanks @Rose Power-Wowza Community Manager for your reply, we are using MediaRecorder which is third party tool w.r.t. wowza for storing video locally when network crashes. Code is working fine and we are able to store the video locally without audio because device resource(MIC - related to Audio source) is still being used by Wowza mp4Writer after network crashes.Please provide appropriate solution.

Note : Sometimes it is releasing audio source & sometimes MediaRecorder throwing IllegalStateException.

Thanks you very much in advance.
