Exemplo n.º 1
0
 public static bool IsContainedByRange(MediaMarker mediaMarker, TimeSpan rangeStart, TimeSpan rangeEnd)
 {
     return(mediaMarker.Begin > rangeStart &&
            mediaMarker.Begin < rangeEnd &&
            mediaMarker.End > rangeStart &&
            mediaMarker.End < rangeEnd);
 }
 public ScriptMediaMarker(MediaMarker marker)
 {
     Content = marker.Content;
     Id = marker.Id;
     Begin = marker.Begin.TotalSeconds;
     End = marker.End.TotalSeconds;
     Type = marker.Type;
 }
 protected MediaMarker(MediaMarker mediaMarker)
 {
     Begin = mediaMarker.Begin;
     Content = mediaMarker.Content;
     End = mediaMarker.End;
     Id = mediaMarker.Id;
     Type = mediaMarker.Type;
 }
Exemplo n.º 4
0
 protected MediaMarker(MediaMarker mediaMarker)
 {
     Begin   = mediaMarker.Begin;
     Content = mediaMarker.Content;
     End     = mediaMarker.End;
     Id      = mediaMarker.Id;
     Type    = mediaMarker.Type;
 }
 private void MediaPlugin_MarkerReached(IMediaPlugin mediaPlugin, MediaMarker mediaMarker)
 {
     var timelineMarker = new TimelineMediaMarker
     {
         Begin = mediaMarker.Begin,
         Content = mediaMarker.Content,
         End = mediaMarker.End,
         Id = mediaMarker.Id,
         Type = mediaMarker.Type
     };
     Dispatcher.BeginInvoke(() => OnTimelineMarkerReached(timelineMarker, false));
 }
 public static bool IsActiveInRange(MediaMarker mediaMarker, TimeSpan rangeStart, TimeSpan rangeEnd)
 {
     return mediaMarker.Begin <= rangeEnd && mediaMarker.End > rangeStart;
 }
 public static bool IsContainedByRange(MediaMarker mediaMarker, TimeSpan rangeStart, TimeSpan rangeEnd)
 {
     return mediaMarker.Begin > rangeStart
             && mediaMarker.Begin < rangeEnd
             && mediaMarker.End > rangeStart
             && mediaMarker.End < rangeEnd;
 }
 public static bool IsActiveAtPosition(MediaMarker mediaMarker, TimeSpan position)
 {
     return mediaMarker.Begin <= position && position < mediaMarker.End;
 }
        private void MediaElement_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
        {
            string logMessage = string.Format(SmoothStreamingResources.TimelineMarkerReached, e.Marker.Time,
                                              e.Marker.Type, e.Marker.Text);
            SendLogEntry(KnownLogEntryTypes.SmoothStreamingMediaElementMarkerReached, message: logMessage);

            var mediaMarker = new MediaMarker
            {
                Type = e.Marker.Type,
                Begin = e.Marker.Time,
                End = e.Marker.Time,
                Content = e.Marker.Text
            };

            NotifyMarkerReached(mediaMarker);
        }
 private void NotifyMarkerReached(MediaMarker mediaMarker)
 {
     MarkerReached.IfNotNull(i => i(this, mediaMarker));
 }
Exemplo n.º 11
0
 public static bool IsActiveInRange(MediaMarker mediaMarker, TimeSpan rangeStart, TimeSpan rangeEnd)
 {
     return(mediaMarker.Begin <= rangeEnd && mediaMarker.End > rangeStart);
 }
Exemplo n.º 12
0
 public static bool IsActiveAtPosition(MediaMarker mediaMarker, TimeSpan position)
 {
     return(mediaMarker.Begin <= position && position < mediaMarker.End);
 }