Commit 6798c08e authored by Martin Finkel's avatar Martin Finkel

Samples: Dispose resources in the F# sample

parent 486cc46b
...@@ -3,10 +3,13 @@ open LibVLCSharp ...@@ -3,10 +3,13 @@ open LibVLCSharp
[<EntryPoint>] [<EntryPoint>]
let main argv = let main argv =
printfn "Hello World from F#!"
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, new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))) |> ignore let media = new Media(libVLC, new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))
let result = Console.ReadKey() mp.Play(media) |> ignore
media.Dispose()
Console.ReadKey() |> ignore
mp.Dispose()
libVLC.Dispose()
0 0
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