IOS app disable sleep when open

Is there a way to disable sleep while the app is open then enable it again when closed or when you lock the device? I am starting to use the app as my main media center controller and only want the screen to stay on while im in the app. I used to use the harmony hub remote app and this was a feature of it that kept the device awake while using the app. It was a nice feature without having to unlock the device while your browsing for media and not tapping on anything.