Ivan Leal Member Licensed User Longtime User Jan 7, 2018 #1 Hello everyone. I'm trying to play a short video through SimpleExoPlayer using a URL and I get the following message: Error: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403 The file permissions are set unrestricted. The command line is: sources.Add(player1.CreateUriSource("http://www.forestsoftware.com.br/nicholas/Conteudos/Landscape - 757.mp4")) Anyone have any ideas?
Hello everyone. I'm trying to play a short video through SimpleExoPlayer using a URL and I get the following message: Error: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403 The file permissions are set unrestricted. The command line is: sources.Add(player1.CreateUriSource("http://www.forestsoftware.com.br/nicholas/Conteudos/Landscape - 757.mp4")) Anyone have any ideas?
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2018 #2 Try this: B4X: sources.Add(player1.CreateUriSource("link here".Replace(" ", "%20"))) Upvote 0
Ivan Leal Member Licensed User Longtime User Jan 7, 2018 #3 Great Erel!!! Thank's a lot for the tip. It worked. Upvote 0
moster67 Expert Licensed User Longtime User Jan 7, 2018 #4 When I write complicated Uri:s, I always use the built-in StringUtils library which has a method for these purposes, namely EncodeURL See: https://www.b4x.com/android/help/stringutils.html#stringutils_encodeurl Upvote 0
When I write complicated Uri:s, I always use the built-in StringUtils library which has a method for these purposes, namely EncodeURL See: https://www.b4x.com/android/help/stringutils.html#stringutils_encodeurl
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2018 #5 moster67 said: When I write complicated Uri:s, I always use the built-in StringUtils library which has a method for these purposes, namely EncodeURL Click to expand... Note that you cannot encode the full url as it will replace the slashes. Upvote 0
moster67 said: When I write complicated Uri:s, I always use the built-in StringUtils library which has a method for these purposes, namely EncodeURL Click to expand... Note that you cannot encode the full url as it will replace the slashes.
moster67 Expert Licensed User Longtime User Jan 7, 2018 #6 Erel said: Note that you cannot encode the full url as it will replace the slashes Click to expand... True, on second thoughts I encode specific parts of the Url Upvote 0
Erel said: Note that you cannot encode the full url as it will replace the slashes Click to expand... True, on second thoughts I encode specific parts of the Url