Arash Emami
Top achievements
Rank 1
Arash Emami
asked on 05 Apr 2010, 08:04 PM
I'm flabbergasted as to why the most basic of databinding scenarios is not working with your control.
I have a RadMediaPlayer and I want to bind my video URL to it. That's all.
From looking at your examples, it seems like it is necessary to have a RadMediaItem inside it, but this doesn't work:
<telerikMedia:RadMediaPlayer HorizontalAlignment="Left" Margin="28,70,0,157" Width="301" Header="" SelectedIndex="0">
<telerikMedia:RadMediaItem Source="{Binding Item1.LowResVideoUrl}"/>
</telerikMedia:RadMediaPlayer>
What am I missing here? Why is the most basic of binding scenarios difficult with this control?
10 Answers, 1 is accepted
0
Hello Arash Emami,
I have prepared a sample project demonstrating a very basic binding scenario.
Can you please check it and let us know if it works for you?
Any additional comments are highly appreciated.
Best wishes,
Vladislav
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.
I have prepared a sample project demonstrating a very basic binding scenario.
Can you please check it and let us know if it works for you?
Any additional comments are highly appreciated.
Best wishes,
Vladislav
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
Jim
Top achievements
Rank 1
answered on 14 Apr 2010, 09:08 PM
Thanks for the sample project - it seems the key is to set SelectedIndex="0" on the RadMediaPlayer. I found that setting IsSelected="True" on the RadMediaItem seems to do the same thing.
The problem though is that the video then starts playing automatically, even with AutoPlay="False". Apparently the act of setting the selected item for the media player also starts that selected item playing. How can I use this without having the video auto-play?
Thanks,
Jim
0
Hi Jim,
The "AutoPlay" property of the RadMediaPlayer is obsolete.
Anyway we have plans to implement a similar property. This issue is logged in our PITS application under the title "MediaPlayer: AutoPlay support". You can track its progress there and vote for it.
In the meantime you can use the attached project as a workaround.
Kind regards,
Vladislav
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.
The "AutoPlay" property of the RadMediaPlayer is obsolete.
Anyway we have plans to implement a similar property. This issue is logged in our PITS application under the title "MediaPlayer: AutoPlay support". You can track its progress there and vote for it.
In the meantime you can use the attached project as a workaround.
Kind regards,
Vladislav
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
Jim Miles
Top achievements
Rank 1
answered on 26 Jul 2010, 09:21 PM
Hi, I'm doing some testing with the media player and just want to play a video (Silverlight 4, Rad Q1 2010). Does the mediaplayer require a binded source? Can it just be a URL to the video? (http://mysite/video.wmv)
Trying to do a simple sample like in the documentation and the media player says "Failed to load media".
(from ms-help://telerik.windows.controls.Silverlight/telerik.windows.controls.mediaplayer/radmediaplayer-populating.html)
I updated it to the following for my sample:
I'm also working with the demo Rad controls and it's been over 30 days, would that have an affect?
Thanks,
-jim
Trying to do a simple sample like in the documentation and the media player says "Failed to load media".
<telerikMediaPlayer:RadMediaPlayer Width="600"
Height="400" Margin="20">
<telerikMediaPlayer:RadMediaItem
Source=http://mschnlnine.vo.llnwd.net/d1/ch9/7/1/5/1/2/4/DynamicsDuoCRMSilverlight_ch9.wmv
Header="The Dynamics Duo talk about CRM and Silverlight" />
</telerikMediaPlayer:RadMediaPlayer>
<telerikMediaPlayer:RadMediaItem
Source=http://mschnlnine.vo.llnwd.net/d1/ch9/7/1/5/1/2/4/DynamicsDuoCRMSilverlight_ch9.wmv
Header="The Dynamics Duo talk about CRM and Silverlight" />
</telerikMediaPlayer:RadMediaPlayer>
(from ms-help://telerik.windows.controls.Silverlight/telerik.windows.controls.mediaplayer/radmediaplayer-populating.html)
I updated it to the following for my sample:
<
telerikMedia:RadMediaPlayer
Margin
=
"261,39,16,4"
Header
=
""
Background
=
"Black"
EnableFullScreenIcon
=
"True"
Grid.Row
=
"1"
AutoPlay
=
"true"
>
<
telerikMedia:RadMediaItem
Source
=
"http://mschnlnine.vo.llnwd.net/d1/ch9/7/1/5/1/2/4/DynamicsDuoCRMSilverlight_ch9.wmv"
Header
=
"The Dynamics Duo talk about CRM and Silverlight"
IsStreamingSource
=
"false"
/>
</
telerikMedia:RadMediaPlayer
>
I'm also working with the demo Rad controls and it's been over 30 days, would that have an affect?
Thanks,
-jim
0
Hello Jim Miles,
Can you please make sure that you start your Silverlight application with Web project and web page? (your page should be hosted in http environmental). Silverlight is restricting cross-schema media playing - from local silverlight app C:// to http video.
You do not need bound source and should work the way you pasted it.
Please let us know if this does not help you.
Regards,
Miro Miroslavov
the Telerik team
Can you please make sure that you start your Silverlight application with Web project and web page? (your page should be hosted in http environmental). Silverlight is restricting cross-schema media playing - from local silverlight app C:// to http video.
You do not need bound source and should work the way you pasted it.
Please let us know if this does not help you.
Regards,
Miro Miroslavov
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
Jim Miles
Top achievements
Rank 1
answered on 27 Jul 2010, 10:49 PM
Thanks Miro, that seemed to be the issue. I created a fresh project with just the video player and it works. My other project was also in a web page, but it didn't have some of the normal web app options in VS 2010, so must be something with converting it from a Blend project? Anyhow...
Thanks
-jim
Thanks
-jim
0
Terry
Top achievements
Rank 1
answered on 11 Aug 2010, 11:10 PM
How do you bind a video that is in a sub folder of the web application?
I took the example and tried modifying the sample app from this thread as this:
this.Item1.LowResVideoUrl = "../Video/Demo2.wmv";
The RadMediaPlayer shows, but it has a white area with a red X and the message "Failed to open media!"
I'm running with Silverlight 4 and VS 2010.
If I change that line to
this.Item1.LowResVideoUrl = "http://localhost:4778/Video/Demo2.wmv";
the video plays correctly.
I took the example and tried modifying the sample app from this thread as this:
this.Item1.LowResVideoUrl = "../Video/Demo2.wmv";
The RadMediaPlayer shows, but it has a white area with a red X and the message "Failed to open media!"
I'm running with Silverlight 4 and VS 2010.
If I change that line to
this.Item1.LowResVideoUrl = "http://localhost:4778/Video/Demo2.wmv";
the video plays correctly.
0
Hi Terry,
Can you try this.Item1.LowResVideoUrl = "/../Video/Demo2.wmv"; because starting with "/" means relative to the App. web root, while without "/" is relative to the xaml file where you declared the MediaPlayer.
Hope will help you.
Regards,
Miro Miroslavov
the Telerik team
Can you try this.Item1.LowResVideoUrl = "/../Video/Demo2.wmv"; because starting with "/" means relative to the App. web root, while without "/" is relative to the xaml file where you declared the MediaPlayer.
Hope will help you.
Regards,
Miro Miroslavov
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
R
Top achievements
Rank 1
answered on 06 Feb 2013, 08:43 PM
I am facing the same problem..how did u fix it?
The above solution by Miro dosent work.
The above solution by Miro dosent work.
0
Hello,
If the video file is hosted on the server, then you can get its url and pass it as a source to the RadMediaItem:
Please find attached a sample solution demonstrating this approach.
All the best,
Tina Stancheva
the Telerik team
If the video file is hosted on the server, then you can get its url and pass it as a source to the RadMediaItem:
<
telerik:RadMediaPlayer
>
<
telerik:RadMediaItem
Header
=
"Video 1"
Source
=
"http://localhost:27613/videos/telerik.wmv"
/>
</
telerik:RadMediaPlayer
>
Please find attached a sample solution demonstrating this approach.
All the best,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.