예제 #1
0
        private async void openButton_Click(object sender, RoutedEventArgs e)
        {
            XspfTrack trk = (sender as Button).DataContext as XspfTrack;

            if (trk != null)
            {
                await Launcher.LaunchUriAsync(trk.Location);
            }
        }
예제 #2
0
        public async Task TestTrackListIndex()
        {
            XspfTrack trk = xspf.TrackList[1];

            Assert.AreEqual(trk.Title, "单播:CCTV-⒈ 综合");

            string streamUriStr = Uri.EscapeDataString(trk.Location.ToString());
            await Launcher.LaunchUriAsync(
                new Uri(string.Format("vlc://openstream?from=url&url={0}", streamUriStr)));
        }
예제 #3
0
        private async void vlcOpenButton_Click(object sender, RoutedEventArgs e)
        {
            XspfTrack trk = (sender as Button).DataContext as XspfTrack;

            if (trk != null)
            {
                string streamUriStr = Uri.EscapeDataString(trk.Location.ToString());
                Uri    vlcUri       = new Uri(string.Format("vlc://openstream?from=url&url={0}", streamUriStr));
                await Launcher.LaunchUriAsync(vlcUri);
            }
        }
예제 #4
0
        private async void openWithButton_Click(object sender, RoutedEventArgs e)
        {
            XspfTrack trk = (sender as Button).DataContext as XspfTrack;

            if (trk != null)
            {
                LauncherOptions options = new LauncherOptions();
                options.DisplayApplicationPicker = true;
                await Launcher.LaunchUriAsync(trk.Location, options);
            }
        }