Can my app pass an SMB path to VLC?

VLC for Android and Chrome OS specific usage questions
vvvvlllllccccc
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Oct 2014 12:40

Can my app pass an SMB path to VLC?

Postby vvvvlllllccccc » 01 Aug 2022 15:03

I mean, suppose that there is a SMB file server, named `\\server` (or `smb://server`), and there is a video file on it like `\\server\videos\clip1.mp4`. Can my app pass this file URL to Android VLC so that VLC can play the video file by streaming (not copying the whole file to the phone first)? Android VLC already is capable of connecting to an SMB server and playing a file on it, manually within VLC, so I guess it might be possible, but I am not sure.

Aza
Developer
Developer
Posts: 2127
Joined: 14 Mar 2019 10:04

Re: Can my app pass an SMB path to VLC?

Postby Aza » 02 Aug 2022 06:26

Did you try in More > Streams > New stream?

vvvvlllllccccc
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Oct 2014 12:40

Re: Can my app pass an SMB path to VLC?

Postby vvvvlllllccccc » 02 Aug 2022 17:07

Did you try in More > Streams > New stream?
No, I did not mean doing it manually as an end user. I meant my app's passing an SMB path to VLC. Imagine that my app is listing the video files on an SMB shared directory. When the user clicks a video file, I want to open it with VLC, by passing the file's SMB path (e.g., smb:\\server\dir\file.mp4) to it.

I do not want to copy the video file to a local temp directory and then pass that local path to VLC, nor do I want to create an intermediary web server for it and pass the HTTP video URL to VLC.

Aza
Developer
Developer
Posts: 2127
Joined: 14 Mar 2019 10:04

Re: Can my app pass an SMB path to VLC?

Postby Aza » 03 Aug 2022 07:11

Sorry, I completely missed your point.

Code: Select all

startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("vlc://smb://server/path/to/file/file.mp4")))
should do the trick

vvvvlllllccccc
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Oct 2014 12:40

Re: Can my app pass an SMB path to VLC?

Postby vvvvlllllccccc » 05 Aug 2022 04:25

Sorry, I completely missed your point.

Code: Select all

startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("vlc://smb://server/path/to/file/file.mp4")))
should do the trick
That worked. Thanks. I had wondered if it is allowed to have "://" inside of a URL, but apparently, that is.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 10 guests