Inheritance: RoutedEventArgs, ITimelineMarkerRoutedEventArgs
 async void pf_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
 {
     if (e.Marker.Type == "myAd")
     {
         var adSource = new RemoteAdSource() { Type = VastAdPayloadHandler.AdType, Uri = new Uri("http://smf.blob.core.windows.net/samples/win8/ads/vast_linear.xml") };
         //var adSource = new AdSource() { Type = DocumentAdPayloadHandler.AdType, Payload = SampleAdDocument };
         var progress = new Progress<AdStatus>();
         try
         {
             await player.PlayAd(adSource, progress, CancellationToken.None);
         }
         catch { /* ignore */ }
     }
 }
        void theSound_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
        {

            MediaElement sound = (sender as MediaElement);
            if (LoopTime > 0 && _loopPlaying)
            {
                _loopIndex = (_loopIndex + 1) % _sounds.Count;
                for (int i = 0; i < _sounds.Count; i++)
                {
                    if (i == _loopIndex)
                    {
                        _sounds[i].Sound.Position = TimeSpan.FromMilliseconds(0);
                        _sounds[i].Sound.Volume = (Volume == -1) ? 0.5 : Volume;
                        _sounds[i].Sound.Play();
                    }
                }
            }
        }
Ejemplo n.º 3
0
 void mediaPlayer_MarkerReached_scrobble(object sender, TimelineMarkerRoutedEventArgs e)
 {
     if (!isScrobbledOnce)
     {
     }
     //throw new NotImplementedException();
 }
 private void MediaPlayer_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
 {
     //MediaPlayer.Stop();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Handler for the MediaElement.MarkerReached event.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MediaElement_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
 {
     // Display marker info when a marker is reached
     Scenario3Text.Text += e.Marker.Text + ": " + String.Format("{0:g}\n", Math.Round(e.Marker.Time.TotalSeconds, 2));
 }
Ejemplo n.º 6
0
 private void MediaElementOnMarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
 {
     foreach (var t in e.Marker.Text.Split(','))
     {
         ExecuteAction(new SavedAction(t));
     }
 }