Playing video from intranet sites
Hi,
I'm trying to play a video from an intranet site, I have SSL certs installed for this site and I can play the video through the Android emulators browser with no issues When I try to run the same video through the VLCSharp library I get an error
Is there a setting to enable an intranet link since it works from the device in a browser I would imagine it should work through the library?
Log message when playing the video
[VLC] [bc586c10/4161] libvlc tls client: cannot resolve myintranetdomain port 443: No address associated with hostname
[VLC] [d7b15650/4161] libvlc stream: HTTP connection failure
[VLC] [bc647630/4161] libvlc input: Your input can't be opened
[VLC] [bc647630/4161] libvlc input: VLC is unable to open the MRL 'https://myintranetdomain/some/nested/path/avideofile_1280x720.mp4'. Check the log for details.
LogCat for the emulator filtered by VLC
Error (15570) / VLC: [bc587f10/3d08] libvlc tls client: cannot resolve myintranetdomain port 443: No address associated with hostname
Error (15570) / VLC: [d7b15150/3d08] libvlc stream: HTTP connection failure
Error (15570) / VLC: [d7bdb630/3d08] libvlc input: Your input can't be opened
Error (15570) / VLC: [d7bdb630/3d08] libvlc input: VLC is unable to open the MRL 'https://myintranetdomain/some/nested/path/avideofile_1280x720.mp4'. Check the log for details.
Error (16691) / VLC: [bc586c10/4161] libvlc tls client: cannot resolve myintranetdomain port 443: No address associated with hostname
Error (16691) / VLC: [d7b15650/4161] libvlc stream: HTTP connection failure
Error (16691) / VLC: [bc647630/4161] libvlc input: Your input can't be opened
Error (16691) / VLC: [bc647630/4161] libvlc input: VLC is unable to open the MRL 'https://myintranetdomain/some/nested/path/avideofile_1280x720.mp4'. Check the log for details.
My code is very basic as this was a test to see if the video functionality was suitable for an app we already have released
public class VideoViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public VideoViewModel()
{
Task.Run((Action)Initialize);
}
private LibVLC LibVLC { get; set; }
private MediaPlayer _mediaPlayer;
public MediaPlayer MediaPlayer
{
get => _mediaPlayer;
private set => Set(nameof(MediaPlayer), ref _mediaPlayer, value);
}
private void Initialize()
{
Core.Initialize();
LibVLC = new LibVLC();
MediaPlayer = new MediaPlayer(LibVLC)
{//http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
Media = new Media(LibVLC, "https://myintranetdomain/some/nested/path/avideofile_1280x720.mp4", FromType.FromLocation),
EnableHardwareDecoding = true
};
MediaPlayer.Play();
}
private void Set<T>(string propertyName, ref T field, T value)
{
if (field == null && value != null || field != null && !field.Equals(value))
{
field = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Thanks for any help and for releasing the library
Cheers