parameter for live mode

Feb 1, 2010 at 11:37 PM

Hello , I am using SMF in my application but I am getting an issue while playing live feed. Actually player is not showing live feed directly when i click on Live telecast link in my application. I have to press GoLive Button in player everytime for watching Livefeed. Is there any parameters or settings required to play live feed directly .Thanks,Akshay

Feb 5, 2010 at 9:18 PM

Did you set AutoPlay = true on the CoreSmoothStreamingMediaElement?

Feb 5, 2010 at 9:28 PM

Thanks for the response. Yes , its already set .

but it plays the movie from my archieve , its not starting Live directly .

Let me tell you my scenario. My encoder is encoding some videos , and user has rights to do DVR for entire content. But when user start any live channel. My player is showing from the starting of movie (when i started the encoder )  , Not showing the Live streaming show . I have to click on "go live" button, then only it starts Live show..

Thanks Akshay.



Feb 22, 2010 at 8:59 PM


I apologize for the belated response.  I believe I understand your challenge, you want the video to "Jump To Live" automatically when the Live stream starts?  Unfortunately this is something that is not supported "out of the box" in SMF v1.1 but something we have plans to support in future versions.

Mar 25, 2010 at 8:09 PM

So how do you best do this in code then ?  Do you have to wait for the mediaOpened and set the position?  but what do you set it to ?

btw, this seems like a pretty major shortcoming for SMF with Live events.

Mar 25, 2010 at 8:14 PM

I'm also having to fix this bug for my current project. My thinking was to either wait for media opened or on entering the GoToLive viewstate the first time after a video is set to just fire off the GoToLive event.

Do remember that the current version of SMF is a beta as I'm finding out more and more. Lots of little issues that keep popping up. I really hope V2 for SL 4 is released very soon.

Apr 8, 2010 at 8:01 PM

I fixed this in my Player.cs source code for SMF. Basically in the mediaElement_MediaOpened event after the UpdateLiveMode() is called you want to do a JumpToLive if it is in GoToLive state.

If you look for that event and after the UpdateLiveMode() call add this

if(LiveMode == LiveModeState.GoToLive)//Make sure we start out live
It is around line 1039 in my source code (I have made other modifications)

Apr 9, 2010 at 11:15 PM

I'm pretty sure all you need is to specify LivePlaybackStartPosition="End" on your CoreSmoothStreamingMediaElement (in XAML, can also be done in codebehind).


Apr 10, 2010 at 4:13 PM


Thanks I never noticed that property, haven't used the CSSME directly at all. Changing my code accordingly. Might be nice if SMF wrapped that for better visibility.

Apr 30, 2010 at 8:44 PM

Just an update.. the set position to End did not work for me. I tried in xaml and in code. Even setting it right before live stream was set.

Apr 30, 2010 at 9:50 PM


I have used that parameter with SSME on live streams quite a bit, and it seems to always work for me.

<ssme:SmoothStreamingMediaElement x:Name="medSSME" LivePlaybackStartPosition="End" />


Apr 30, 2010 at 9:53 PM

Yep tried that and via code. It might be something with how our client has their live stream set up. We are also running into issues where the stream total duration goes in reverse. Every second the scrubber advances the total time decreases a second.

Jun 5, 2010 at 9:19 PM

I'm having a similar issue, a live smooth stream at startup doesn't move to live position but starts from the beginning. I've set LivePlaybackStartPosition="End" and checking code inside UpdateLiveMode method it looks that mediaElement.IsLive is false even if the event is live.

I've compared the header of a working stream vs failing one:


  <?xml version="1.0" ?>
- <SmoothStreamingMedia MajorVersion="2" MinorVersion="0" Duration="0" TimeScale="10000000" IsLive="TRUE" LookAheadFragmentCount="2" DVRWindowLength="0">
 <SmoothStreamingMedia MajorVersion="2" MinorVersion="0" Duration="0" TimeScale="10000000" IsLive="TRUE" LookAheadFragmentCount="2" DVRWindowLength="72000000000">
As you can see only difference is DVRWindowLength, may that be the cause?
Jun 5, 2010 at 9:52 PM
Edited Jun 6, 2010 at 7:20 AM

DVRWindowLength doesn't seems to be the cause, at startup "live" stream starts working only after video ha started and "live" button clicked...
I have now used a timer that invokes "JumpToLive" after 200 ms and seems to work, but I'd like to know if there are better alternatives.