Commit 0dac1158 authored by Martin Finkel's avatar Martin Finkel

Fix Android sample

parent dd065f09
......@@ -17,18 +17,16 @@ namespace LibVLCSharp.Android.Sample
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
_surfaceView = FindViewById<SurfaceView>(Resource.Id.surfaceView);
AttachSurfaceView(_surfaceView);
}
protected override void OnResume()
{
base.OnResume();
_surfaceView = FindViewById<SurfaceView>(Resource.Id.surfaceView);
AttachSurfaceView(_surfaceView);
var media = new Media(new Instance(), "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
MediaPlayer.Media = media;
MediaPlayer.Play();
MediaPlayer.Play(new Media(Instance, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation));
}
}
}
\ No newline at end of file
......@@ -43,5 +43,6 @@ namespace LibVLCSharp.Platforms.Android
}
public MediaPlayer MediaPlayer => _mediaPlayer;
public Instance Instance => _instance;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment