Commit f736d078 authored by Martin Finkel's avatar Martin Finkel

Samples: use new API

parent d46f704f
...@@ -33,7 +33,7 @@ namespace LibVLCSharp.Forms.Sample ...@@ -33,7 +33,7 @@ namespace LibVLCSharp.Forms.Sample
{ {
Media = new Media(_libVLC, Media = new Media(_libVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
Media.FromType.FromLocation) FromType.FromLocation)
}; };
} }
} }
......
...@@ -33,7 +33,7 @@ namespace LibVLCSharp.Android.Sample ...@@ -33,7 +33,7 @@ namespace LibVLCSharp.Android.Sample
_videoView = new VideoView(this) { MediaPlayer = _mediaPlayer }; _videoView = new VideoView(this) { MediaPlayer = _mediaPlayer };
AddContentView(_videoView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent)); AddContentView(_videoView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent));
var media = new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation); var media = new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
var configuration = new MediaConfiguration(); var configuration = new MediaConfiguration();
configuration.EnableHardwareDecoding(); configuration.EnableHardwareDecoding();
media.AddOption(configuration); media.AddOption(configuration);
......
...@@ -7,6 +7,6 @@ let main argv = ...@@ -7,6 +7,6 @@ let main argv =
Core.Initialize() Core.Initialize()
let libVLC = new LibVLC() let libVLC = new LibVLC()
let mp = new MediaPlayer(libVLC) let mp = new MediaPlayer(libVLC)
mp.Play(new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)) |> ignore mp.Play(new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation)) |> ignore
let result = Console.ReadKey() let result = Console.ReadKey()
0 0
\ No newline at end of file
...@@ -29,7 +29,7 @@ namespace LibVLCSharp.GTK.Sample ...@@ -29,7 +29,7 @@ namespace LibVLCSharp.GTK.Sample
//Starts playing //Starts playing
using (var media = new Media(libvlc, using (var media = new Media(libvlc,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
Media.FromType.FromLocation)) FromType.FromLocation))
{ {
mediaPlayer.Play(media); mediaPlayer.Play(media);
} }
......
...@@ -31,7 +31,7 @@ namespace LibVLCSharp.Mac.Sample ...@@ -31,7 +31,7 @@ namespace LibVLCSharp.Mac.Sample
View = _videoView; View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); _videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
public override NSObject RepresentedObject public override NSObject RepresentedObject
......
...@@ -11,7 +11,7 @@ namespace LibVLCSharp.NetCore.Sample ...@@ -11,7 +11,7 @@ namespace LibVLCSharp.NetCore.Sample
using(var libVLC = new LibVLC()) using(var libVLC = new LibVLC())
{ {
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation); var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
using(var mp = new MediaPlayer(media)) using(var mp = new MediaPlayer(media))
{ {
media.Dispose(); media.Dispose();
......
...@@ -44,7 +44,7 @@ namespace LibVLCSharp.WPF.Sample ...@@ -44,7 +44,7 @@ namespace LibVLCSharp.WPF.Sample
if (!parent.VideoView.MediaPlayer.IsPlaying) if (!parent.VideoView.MediaPlayer.IsPlaying)
{ {
parent.VideoView.MediaPlayer.Play(new Media(_libVLC, parent.VideoView.MediaPlayer.Play(new Media(_libVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
} }
} }
......
...@@ -45,7 +45,7 @@ namespace LibVLCSharp.WPF.Sample ...@@ -45,7 +45,7 @@ namespace LibVLCSharp.WPF.Sample
if (!VideoView.MediaPlayer.IsPlaying) if (!VideoView.MediaPlayer.IsPlaying)
{ {
VideoView.MediaPlayer.Play(new Media(_libVLC, VideoView.MediaPlayer.Play(new Media(_libVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
} }
} }
......
...@@ -25,7 +25,7 @@ namespace LibVLCSharp.WinForms.Sample ...@@ -25,7 +25,7 @@ namespace LibVLCSharp.WinForms.Sample
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
_mp.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); _mp.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
} }
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ namespace LibVLCSharp.Windows.Net40.Sample ...@@ -10,7 +10,7 @@ namespace LibVLCSharp.Windows.Net40.Sample
Core.Initialize(); Core.Initialize();
var libVLC = new LibVLC(); var libVLC = new LibVLC();
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation); var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
var mp = new MediaPlayer(media); var mp = new MediaPlayer(media);
mp.Play(); mp.Play();
Console.ReadKey(); Console.ReadKey();
......
...@@ -22,7 +22,7 @@ namespace LibVLCSharp.iOS.Sample ...@@ -22,7 +22,7 @@ namespace LibVLCSharp.iOS.Sample
View = _videoView; View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); _videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
} }
} }
\ No newline at end of file
...@@ -22,7 +22,7 @@ namespace LibVLCSharp.tvOS.Sample ...@@ -22,7 +22,7 @@ namespace LibVLCSharp.tvOS.Sample
View = _videoView; View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation)); _videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
} }
} }
} }
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