AdaptiveMedia

Aug 26, 2011 at 6:27 PM

I have set playItem.DeliveryMethod = DeliveryMethods.AdaptiveStreaming;

Shouldn't in that case the player.IsMediaAdaptive == true?

 

Aug 26, 2011 at 9:43 PM
Edited Aug 26, 2011 at 9:47 PM

Aha, I went into the sources in debugging and there's an exception catched in the OnMediaOpened(), when it tryes to set the IsMediaLive and then  IsMediaAdaptive then calls to this.GoToVisualState(state) the exception happens.

It happens here:

protected virtual void OnMediaOpened()
{
  try
  {
      SendLogEntry(message: SilverlightMediaFrameworkResources.MediaOpenedLogMessage, type: KnownLogEntryTypes.MediaOpened);

      if (ActiveMediaPlugin != null)
   { 
      VolumeLevel = ActiveMediaPlugin.Volume;
     IsMuted = ActiveMediaPlugin.IsMuted;
     IsMediaLive = IsLiveMediaSupported && ActiveLiveMediaPlugin.IsSourceLive; //Exception

.....

Aug 26, 2011 at 10:04 PM

So, "I fixed" it by try-catch in the OnIsLiveChanged()

 

private void OnIsLiveChanged()
{
string state = IsLive
? TimelineVisualStates.LiveStates.Live
: TimelineVisualStates.LiveStates.Vod;
try
{
 this.GoToVisualState(state); //here is the problem
}
catch
{

}
UpdateLiveAvailability();
}

 

and it seems to fix all the other problems that I had with the DVR and live streaming!!