Commit 5658e8ee authored by Martin Finkel's avatar Martin Finkel

Update samples LibVLCSharp references

parent b211bbac
......@@ -52,12 +52,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="LibVLCSharp">
<Version>0.0.2</Version>
<Version>0.1.1</Version>
</PackageReference>
<PackageReference Include="VideoLAN.LibVLC.Android">
<Version>3.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.871608-pre2" />
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
......
......@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibVLCSharp" Version="0.0.2" />
<PackageReference Include="Xamarin.Forms" Version="3.3.0.871608-pre2" />
<PackageReference Include="LibVLCSharp" Version="0.1.1" />
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -64,7 +64,7 @@ namespace Chromecast
_mediaPlayer.Play(media);
}
void DiscoverChromecasts()
bool DiscoverChromecasts()
{
// load native libvlc libraries
Core.Initialize();
......@@ -72,24 +72,14 @@ namespace Chromecast
// create core libvlc object
_libVLC = new LibVLC();
string rendererName;
// choose the correct service discovery protocol depending on the host platform
// Apple platforms use the Bonjour protocol
if (Device.RuntimePlatform == Device.iOS)
rendererName = _libVLC.RendererList.Select(renderer => renderer.Name).FirstOrDefault(name => name.Equals("Bonjour_renderer"));
else if (Device.RuntimePlatform == Device.Android)
rendererName = _libVLC.RendererList.Select(renderer => renderer.Name).FirstOrDefault(name => name.Equals("microdns_renderer"));
else throw new PlatformNotSupportedException("Only Android and iOS are currently supported in this sample");
// create a renderer discoverer
_rendererDiscoverer = new RendererDiscoverer(_libVLC, rendererName);
_rendererDiscoverer = new RendererDiscoverer(_libVLC);
// register callback when a new renderer is found
_rendererDiscoverer.ItemAdded += RendererDiscoverer_ItemAdded;
// start discovery on the local network
var r = _rendererDiscoverer.Start();
return _rendererDiscoverer.Start();
}
/// <summary>
......
......@@ -6,7 +6,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibVLCSharp" Version="0.0.3" />
<PackageReference Include="LibVLCSharp" Version="0.1.1" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.4" />
</ItemGroup>
</Project>
\ 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