Ejemplo n.º 1
0
        /// <summary>
        /// Allows you to programmatically create a custom video log and specify which video information should be included in the log.
        /// You still need to pass the log on to LoggingService.Current.Log(log);
        /// </summary>
        /// <param name="logType">A string value representing the type of your custom log.</param>
        /// <param name="includeVideoData">A bitwise enum used to control which information should be included with the custom log.</param>
        /// <returns>The newly created log object.</returns>
        public SimpleVideoEventLog CreateVideoLog(string logType, VideoDataEnum includeVideoData)
        {
            var result = healthMonitorLogger.CreateVideoLog(logType);

            if ((includeVideoData & VideoDataEnum.VideoSession) == VideoDataEnum.VideoSession && healthMonitor != null)
            {
                result.VideoSessionId       = healthMonitor.VideoSessionId;
                result.VideoSessionDuration = healthMonitor.VideoSessionRunningTime;
            }
            if ((includeVideoData & VideoDataEnum.CurrentVideoPosition) == VideoDataEnum.CurrentVideoPosition && ssme != null)
            {
                result.VideoPosition = ssme.Position;
            }
            if ((includeVideoData & VideoDataEnum.MediaElementId) == VideoDataEnum.MediaElementId && ssme != null)
            {
                result.MediaElementId = ssme.Name;
            }
            return(result);
        }
 /// <summary>
 /// Allows you to programmatically create a custom video log and specify which video information should be included in the log.
 /// You still need to pass the log on to LoggingService.Current.Log(log);
 /// </summary>
 /// <param name="logType">A string value representing the type of your custom log.</param>
 /// <param name="includeVideoData">A bitwise enum used to control which information should be included with the custom log.</param>
 /// <returns>The newly created log object.</returns>
 public SimpleVideoEventLog CreateVideoLog(string logType, VideoDataEnum includeVideoData)
 {
     var result = healthMonitorLogger.CreateVideoLog(logType);
     if ((includeVideoData & VideoDataEnum.VideoSession) == VideoDataEnum.VideoSession && healthMonitor != null)
     {
         result.VideoSessionId = healthMonitor.VideoSessionId;
         result.VideoSessionDuration = healthMonitor.VideoSessionRunningTime;
     }
     if ((includeVideoData & VideoDataEnum.CurrentVideoPosition) == VideoDataEnum.CurrentVideoPosition && ssme != null)
         result.VideoPosition = ssme.Position;
     if ((includeVideoData & VideoDataEnum.MediaElementId) == VideoDataEnum.MediaElementId && ssme != null)
         result.MediaElementId = ssme.Name;
     return result;
 }