Android Question Unable to access resource from Network path for ExoPlayer

RichardN

Active Member
Licensed User
I am attempting to access a network resource to play using ExoPlayer. The Android test device appears to be able to access my NAS using Astro File Manager without problem.

This code (direct copy from the ExoPlayer example) is causing the issue:-
B4X:
player1.Initialize("player")
Dim sources As List
sources.Initialize
sources.Add(player1.CreateFileSource($"//MYNAS/Videos/Music Videos"$,"My Video.mp4"))        '< error here

The code breaks on the last line with "open failed - no such file or directory"

I understand smb:// is not supported. Am I using the correct method to access the NAS here or have I made a dumb mistake in the path/file name?
 
Last edited:

Erel

Administrator
Staff member
Licensed User
The Android test device appears to be able to access my NAS using Astro File Manager without problem.
This means that Astro File Manager implemented the relevant protocol. It is not something that is built-in to Android OS.

You will probably need to run a media server. This will allow you to stream the video without downloading it first.
 
Upvote 0
Top