This is a migrated thread and some comments may be shown as answers.

autoplay does not want to work with Q2

9 Answers 133 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
mathieu ferlay
Top achievements
Rank 1
mathieu ferlay asked on 19 Aug 2010, 01:21 PM
Hi,
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

Sort by
0
Tina Stancheva
Telerik team
answered on 24 Aug 2010, 03:40 PM
Hello mathieu ferlay,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mathieu ferlay
Top achievements
Rank 1
answered on 24 Aug 2010, 03:56 PM
Hello Tina,
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
0
Tina Stancheva
Telerik team
answered on 27 Aug 2010, 09:56 AM
Hi mathieu ferlay,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mathieu ferlay
Top achievements
Rank 1
answered on 27 Aug 2010, 10:02 AM
Hi,
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.
0
Tina Stancheva
Telerik team
answered on 27 Aug 2010, 01:55 PM
Hi mathieu ferlay,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mathieu ferlay
Top achievements
Rank 1
answered on 27 Aug 2010, 02:31 PM
Hi,

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
0
mathieu ferlay
Top achievements
Rank 1
answered on 02 Sep 2010, 08:18 AM
Hi, Tina.
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
0
R
Top achievements
Rank 1
answered on 06 Feb 2013, 04:35 PM
I tried 340326-mediaplayerexample.zip and it gives an error Failed to open media. Could anyone please help me on this.
0
Tina Stancheva
Telerik team
answered on 08 Feb 2013, 08:06 AM
Hello,

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.

Tags
MediaPlayer
Asked by
mathieu ferlay
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
mathieu ferlay
Top achievements
Rank 1
R
Top achievements
Rank 1
Share this question
or