Esempio n. 1
0
        private void OnPlayClip(PlayClip playClip)
        {
            Debug.WriteLine("Playing clip: " + playClip.Clip);

            SenderName.Text = playClip.Clip.Submitter;
            ClipTitle.Text = playClip.Clip.Title;
            Browser.Navigate(playClip.Clip.EmbeddedURL);
            currentClip = playClip.Clip;
            duration = playClip.Clip.Duration;

            progress = new TimeSpan(0);
            ElapsedTime.Text = "00:00 / " + duration.ToString(@"mm\:ss");
            progressTimer.Start();

            // This is the bastard way to signal a finished clip -- take the duration and add a couple of seconds...
            finishedTimer.Change((playClip.Clip as RichYouTubeClip).Duration + new TimeSpan(0, 0, 5), new TimeSpan(0, 0, 0, 0, -1));
        }
Esempio n. 2
0
 private void NewClip(RichYouTubeClip clip)
 {
     playQueue.AddLast(clip);
     if (!currentlyPlaying) PlayNext();
 }
Esempio n. 3
0
 public PlayClip(RichYouTubeClip clip)
 {
     this.Clip = clip;
 }
Esempio n. 4
0
 private void Finished(RichYouTubeClip clip)
 {
     PlayNext();
 }