Exemple #1
0
        private void TV_MediaChanged(object sender, EventArgs e)
        {
            IrssLog.Info("TV_MediaChanged");

            MediaStatusEventArgs mediaStatusEventArgs = (MediaStatusEventArgs)e;

            // MSPROPTAG_TrackNumber

            IrssLog.Info("Channel: {0}", mediaStatusEventArgs.Value);

            /*
             * if (_externalChannelConfig == null)
             * throw new ApplicationException("Cannot process tune request, no STB settings are loaded");
             *
             * try
             * {
             * Thread newThread = new Thread(new ParameterizedThreadStart(ProcessExternalChannel));
             * newThread.Name = "ProcessExternalChannel";
             * newThread.IsBackground = true;
             * newThread.Start(new string[] { trackNumberProperty });
             * }
             * catch (Exception ex)
             * {
             * IrssLog.Error(ex);
             * }
             */
        }
 /// <summary>
 /// When cast is being played
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnCastStatusChanged(object sender, MediaStatusEventArgs e)
 {
     DispatcherHelper.CheckBeginInvokeOnUI(async() =>
     {
         if (e.Status?.PlayerState == "PLAYING")
         {
             Media.Position = TimeSpan.FromSeconds(e.Status.CurrentTime);
             if (!Media.IsPlaying)
             {
                 await PlayMedia();
             }
         }
     });
 }
 /// <summary>
 /// Occurs when cast media status has changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnCastMediaStatusChanged(object sender, MediaStatusEventArgs e)
 {
     CastStatusChanged?.Invoke(this, e);
 }
Exemple #4
0
 private void OnMSASEvent(object state, MediaStatusEventArgs args)
 {
     //MediaState typedState = (MediaState)state;
     IrssLog.Info("OnMSASEvent: {0} {1} {2} {3}", args.Session, args.SessionID, args.Tag, args.Value);
 }
Exemple #5
0
 private void OnMSASEvent(object state, MediaStatusEventArgs args)
 {
   //MediaState typedState = (MediaState)state;
   IrssLog.Info("OnMSASEvent: {0} {1} {2} {3}", args.Session, args.SessionID, args.Tag, args.Value);
 }