I'm trying to play the video stream "https://s2.moidom-stream.ru/s/public/0000000087.m3u8" using LibVlc, but I only get a black screen. Other threads work fine, but I need this particular thread.
code used:
using Android.App;
using Android.OS;
using Android.Widget;
using LibVLCSharp.Shared;
using System;
using System.Linq;
using WebCamTst.Helpers;
namespace WebCamTst
{
[Activity(Label = "PanelActivity")]
public class PanelActivity : Activity
{
LibVLCSharp.Platforms.Android.VideoView videoView;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.videopanel);
videoView = FindViewById<LibVLCSharp.Platforms.Android.VideoView>(Resource.Id.videoView1);
}
protected override void OnResume()
{
base.OnResume();
PlayVideo("https://s2.moidom-stream.ru/s/public/0000000087.m3u8");
}
private void PlayVideo(string url)
{
Core.Initialize();
using (var libVLC = new LibVLC())
using (var mPlayer = new MediaPlayer(libVLC) { EnableHardwareDecoding = true })
{
videoView.MediaPlayer = mPlayer;
var _media = new Media(libVLC, url, FromType.FromLocation);
_media.Parse(MediaParseOptions.ParseNetwork);
mPlayer.Play(_media);
}
}
}
}
but it doesn't work. Please help!