This question is locked. New answers and comments are not allowed.
Hi,
I am trying to get the radmediaplayer to resize itself if a source video is in portrait mode.
I have a fixed width of 350px available in my UI for the player to be displayed.
The height of the player is allowed to change to fit the video.
I would expect the following code to do the trick but it doesn't.
I tried all other modes of the VideoStrech enumeration but no luck.
I also thought that maybe I could set the height and width of the player manually after looking at the original video source's dimensions but these do not seem to be available.
The properties player.MediaElement.NaturalVideoHeight/Width as described in this post are still 0 after
here I have uploaded a sample portrait video: http://we.tl/vYS9cGTAKd
I am trying to get the radmediaplayer to resize itself if a source video is in portrait mode.
I have a fixed width of 350px available in my UI for the player to be displayed.
The height of the player is allowed to change to fit the video.
I would expect the following code to do the trick but it doesn't.
private RadMediaItem CreateVideoMediaItem(Guid contentId, string previewFilePath){ _radMediaPlayer.Width = 350; return new RadMediaItem { Source = new Uri(GetUri(contentId, previewFilePath)), IsSelected = true, VideoStretch = Stretch.Uniform };}I tried all other modes of the VideoStrech enumeration but no luck.
I also thought that maybe I could set the height and width of the player manually after looking at the original video source's dimensions but these do not seem to be available.
The properties player.MediaElement.NaturalVideoHeight/Width as described in this post are still 0 after
_radMediaPlayer.Items.Add(radMediaItem);_radMediaPlayer.Play();here I have uploaded a sample portrait video: http://we.tl/vYS9cGTAKd