public VlcMedia(VlcInstance instance, string url) { if (File.Exists(url)) { MediaHandle = LibVlc.libvlc_media_new_path(instance.InstanceHandle, url); } else { MediaHandle = LibVlc.libvlc_media_new_location(instance.InstanceHandle, url); } if (MediaHandle == IntPtr.Zero) { throw new VlcException(); } }