Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Spaces not allowed in streamURL tag?

This does not work for me.


<streamUrl>http://myserver/videos/01 First Video.mp4</streamUrl>


My web server reports an error. It gets a request for http://myserver/videos/01. Whatever is parsing the URL out of the XML does not seem to like the space. I have tried URL encoding the filename, but http://myserver/videos/01+First+Video.mp4 is not the URL to get that file. I renamed the file 01_First_Video.mp4 and everything works great. I'd like to support spaces in the file name if possible.

Anyone know if there is a way?
0 Kudos
2 REPLIES 2
retrotom
Visitor

Re: Spaces not allowed in streamURL tag?

Can you just replace the spaces with "%20"?
0 Kudos

Re: Spaces not allowed in streamURL tag?

That was exactly it. I'm using PHP and called urlencode() to encode it. That replaces spaces with a plus sign which is the old way of doing things. I'm calling rawurlencode() now and that conforms to RFC3986 which says to replace spaces with %20 like you suggested. It works great. Thank you.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.