This question is locked. New answers and comments are not allowed.
Hello,
I'm having dificulty getting the RadMediaPlayer to play ISM smooth streaming videos. The server is setup correctly and I can play videos with the smooth streaming player from the toolkit. I'm also able to load and play the video by simply loading it and adding it to the layout root.
Here is my code. I simply attached it to a button.
What I would like to be able to do is load the films via code behind and set title, descriptions and chapters.
However whenever I try this the video never loads, the titles descriptions images and chapters all show fine.
Also when creating a new AdaptiveStream source, I cannot assing the media element to the source because it's looking for a MediaElement and not a RadMediaItem.
So I guess my question is how do I get all this to work together.
Thanks,
Steven
I'm having dificulty getting the RadMediaPlayer to play ISM smooth streaming videos. The server is setup correctly and I can play videos with the smooth streaming player from the toolkit. I'm also able to load and play the video by simply loading it and adding it to the layout root.
Here is my code. I simply attached it to a button.
string uriString = "http://stevenlacharite.com/demoism/demo1.ism"; |
MediaElement MyMediaElement = new MediaElement(); |
Uri MyAdaptiveStreamUrl = new Uri(uriString + "/Manifest"); |
MyMediaElement.Stretch = Stretch.Uniform; |
LayoutRoot.Children.Add(MyMediaElement); |
AdaptiveStreamingSource src = new AdaptiveStreamingSource(); |
src.ManifestUrl = MyAdaptiveStreamUrl; |
src.MediaElement = MyMediaElement; |
src.StartPlayback(); |
MyMediaElement.Play(); |
However whenever I try this the video never loads, the titles descriptions images and chapters all show fine.
Also when creating a new AdaptiveStream source, I cannot assing the media element to the source because it's looking for a MediaElement and not a RadMediaItem.
RadMediaItem media = new RadMediaItem(); |
// set media item stuff. |
Uri MyAdaptiveStreamUrl = new Uri(uriString + "/Manifest"); |
AdaptiveStreamingSource MainSrc = new AdaptiveStreamingSource(); |
MainSrc.ManifestUrl = MyAdaptiveStreamUrl; |
MainSrc.MediaElement = media; |
// ^^^ Error above because of type difference. |
Thanks,
Steven