Attempting to play after setting source with smooth streaming causes an error

Topics: Windows Phone 8
Jul 4, 2013 at 9:56 AM

If i set the source of the video to point to a smooth streaming asset, if I attempt to play it, it fails with an error telling me that you cannot play a video when no source is set. From what I can tell it is due to the smoothstreaming media element attempting to play a video before it has downloaded and processed the manifest for the asset.

My workaround was to subscribe to the media_opened event and when I click play to store a flag to play the video. When the video opens it checks this flag and if it is true it will play the video.

I do not want the video to auto play, is my solution the kind of code I should have to write or is there something else I should be doing?


Jul 11, 2013 at 6:06 AM
Hello Josh, you might be looking for the AutoLoad feature. If you set AutoLoad = false (and leave AutoPlay = true), a big play button will appear in the middle. Only once the user clicks it, will the video start downloading and play ASAP.

If this is not what you're looking for, could you please provide some sample code that demonstrates the problem you're experiencing? Either by pasting in the relevant lines of code or sharing a repro project?

Thanks, Tim