I just pass from Vers.Q1 SP1 to Q2 and my method stop to work like before. I do not know why but the autoplay method refuse to be executed with the same code.
Could you ewplain to me why?
// On créé le lecteur vidéo
Telerik.Windows.Controls.
RadMediaPlayer newPlayerVideo = new Telerik.Windows.Controls.RadMediaPlayer();
Telerik.Windows.Controls.
RadMediaItem mediaItem = new Telerik.Windows.Controls.RadMediaItem();
//mediaItem.Source = new Uri("video_SAV.mp4", UriKind.Relative);
mediaItem.Source =
new Uri("Hot-Line Cut.wmv", UriKind.Relative);
mediaItem.BindingValidationError +=
new EventHandler<ValidationErrorEventArgs>(mediaItem_BindingValidationError);
newPlayerVideo.Items.Add(mediaItem);
newPlayerVideo.AutoPlay =
true;
newPlayerVideo.IsFullScreen =
true;
newPlayerVideo.Height = 545;
newPlayerVideo.MediaOpened +=
new EventHandler<Telerik.Windows.RadRoutedEventArgs>(newPlayerVideo_MediaOpened);
newPlayerVideo.BindingValidationError +=
new EventHandler<ValidationErrorEventArgs>(newPlayerVideo_BindingValidationError);
Data.newWindow.Content = newPlayerVideo;
P. S. : To complete, I need to keep Q1 SP1 dlls because if I change it, it break to much part of my application.
regards,
Mat
9 Answers, 1 is accepted
Can you please elaborate on the issue you are facing? What do you mean by "autoplay method refuse to be executed". Do you need to play the item immediately after the control loads? If this is the case you need to set the SelectedIndex property as well, in this case you need to set it to 0.
Is this what you are looking for or am I missing something?
Sincerely yours,
Tina Stancheva
the Telerik team
Yes I need to play the item immediately after the control loads and even with the selectedIndex set to 0, the video can not be launched(I tried it). I always obtain the launch's button in the center of my frame. I do not manage to find a solution. I tried too, to load the video and call the play method after it the same result...
Regards,
Mat
Can you please elaborate on the issue? Is it that the video isn't played at all unless the play button is hit or is it that the Play button appears in the center of the RadMediaPlayer right before the video starts playing?
Also, if the video isn't played at all, it would be great if you can send us a project reproducing the issue in a support ticket.
Thank you in advance.
Regards,
Tina Stancheva
the Telerik team
yes,the Play button appears in the center of the RadMediaPlayer right before the video starts playing. If I hit the button, I have no problem.
I couldn't reproduce the issue. Can you take a look at the attached test project and let me know if I am missing something. Also, if it doesn't illustrate your scenario correctly, can you please modify it accordingly so that we can investigate the issue further?
Thank you in advance.
Sincerely yours,
Tina Stancheva
the Telerik team
Thanks for providing me the sample and it is working fine. now i'll try it with my application to see wheter it works or not, and let you know.
regards,
Mat
I have found my problem. In fact, your solution was good and the reason why I did not managed to correct my code is because I have twice time the same code for two differents calls, and I corrected only one. So now, my video is automatically launched at the opening of the new window.
Thx a lot !!!
Mat
I downloaded the solution on our side and I updated it to use our latest Silverlight 5 release. And it runs as expected on our side - I attached the updated solution for your reference.
Regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.