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

Clien side API: set_source doesn't work

7 Answers 123 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
bahman
Top achievements
Rank 1
bahman asked on 23 Dec 2013, 07:29 AM
This is a simple use of RadMediaPlayer and I'm totally confused why it doesn't work:

        <telerik:RadMediaPlayer id="rmpMediafiles" runat="server">
        </telerik:RadMediaPlayer>

This is my JavaScript function that sets the Media Player's source:

function OpenMediaModal(MediaPath)
{
var rmpMediafiles = $find('<%=rmpMediafiles.ClientID %>');
rmpMediafiles.set_source(MediaPath);
}

It gives me error that this object has no method 'set_source'. I can not find my problem here!

7 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 25 Dec 2013, 09:16 AM
Hello Bahman,

This functionality is yet to be implemented. At the time being, we will have to remove it from the Client-side basics topic. Sorry for any inconvenience caused.

Currently, I'm afraid it is not possible to set or change the player's source from the client-side. However, you can implement an AJAX approach which will make a minimal request to the server to achieve the same effect.

I have created a sample web site to demonstrate the suggested approach. Please run the attached application and let me know if it helps you.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
bahman
Top achievements
Rank 1
answered on 26 Dec 2013, 09:45 PM
Thanks Eyup,
I was able to change the player settings by manually find the video tag and change the source in my JavaScript function. But I preferred to not using the RadMediaPlayer any more because it has other problems when the source is invalid or it doesn't support the format. I am simply using the HTML5 video tag now.
0
Princy
Top achievements
Rank 2
answered on 27 Dec 2013, 06:42 AM
Hi bagman,

Telerik’s RadMediaPlayer uses the built-in HTML5 <video> and <audio> element functionality to bring rich media capabilities to your apps and hence all the video and audio formats supported by HTML 5 tag is fully supported by RadMediaPlayer as well. So you wont get any extra advantage if you replace the RadmediaPlayer with the HTML 5 video tag. But using the RadMediaPlayer you get a rich as well as high performance control to setup professional configurable player suitable for websites, blogs, online TV channels, e-commerce pages, etc with a lot of configuration settings and customization options.

Thanks,
Princy.
0
bahman
Top achievements
Rank 1
answered on 27 Dec 2013, 08:59 PM
Hi Princy,

Maybe in future RadMediaPlayer would be a great control like other Telerik controls. But for now it has some problems that I prefer to not use it:
- The set_source JavaScript function doesn't work (I really can't understand why nobody tested this function before release the control!!)
- If it doesn't support the format or the file path is incorrect and you click on the play button the loading icon appears and won't be disappeared unless you refresh the page.
- It is not possible to set the video or audio type in JavaScript so it is not possible to switch between video and audio modes in JavaScript.
0
Eyup
Telerik team
answered on 30 Dec 2013, 01:02 PM
Hi Bahman,

Thank you for your understanding that RadMediaPlayer is still a new control which undergoes a great deal of improvement. For example, it will have another big advantage over the standard HTML video tag when the upcoming Telerik controls release will introduce a flash fallback for the older browsers - IE7 and IE8.

I can assure you that our developers are working on improving the control, but please note that the set_source() method is a topic error and it is not related to the control itself. Anyway, please excuse us for the inconvenience this have caused you.

As stated in my previous post, currently it is not possible to set or change the player's source from the client-side. You can log this requirement, as well as any other ideas, to our feedback portal so the dev team take it under consideration:
http://feedback.telerik.com/Project/108

Please feel free to turn to us if new questions arise.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Stephen
Top achievements
Rank 1
answered on 16 Mar 2015, 05:12 PM
I downloaded the radmediaplayerclientsource.zip file. Everything work great but when I enter into fullscreen mode the controls become inactive. For example you cannot change the volume or skip ahead while in fullscreen. Is there an attribute that is missing? Let me know if you need more info. 

Thanks for the help!
0
Eyup
Telerik team
answered on 19 Mar 2015, 03:27 PM
Hello Stephen,

I have already replied to your query in your formal support ticket. I suggest that we continue our conversation on the mentioned thread.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
MediaPlayer
Asked by
bahman
Top achievements
Rank 1
Answers by
Eyup
Telerik team
bahman
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Stephen
Top achievements
Rank 1
Share this question
or