HTTP Status 302 causes roku to crash

My plugin works fine, but on some videos the roku gets stuck on retrieving and then crashes. Most of the videos in the channel play fine on roku. When i look at the logs, i notice that it gives me an HTTP reply status of 302 instead of 200 like it should(but only on the ones that don't work). However, the videos play fine on PC, it's only the roku that has problems.

 

EDIT: I think it's just an issue with the audio, but all of the videos on the channel have the same codecs, i can't figure out a way to fix this. It's a little bit annoying.

I've heard that some client apps don't properly handle Redirects (Status 302) as a response. The more correct method is to return the video url as the key to an IndirectRespose(). ie.

# Not this
def PlayVideo(some_url):
''' convert some_url to video_url '''
return Redirect(video_url)

instead this

@indirect
def PlayVideo(some_url):
‘’’ convert some_url to video_url ‘’’
return IndirectResponse(VideoClipObject, key=video_url)