Clien side API: set_source doesn't work

8 posts, 0 answers
  1. bahman
    bahman avatar
    3 posts
    Member since:
    Nov 2012

    Posted 23 Dec 2013 Link to this post

    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!
  2. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 25 Dec 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. bahman
    bahman avatar
    3 posts
    Member since:
    Nov 2012

    Posted 26 Dec 2013 Link to this post

    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.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Dec 2013 Link to this post

    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.
  6. bahman
    bahman avatar
    3 posts
    Member since:
    Nov 2012

    Posted 27 Dec 2013 Link to this post

    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.
  7. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 30 Dec 2013 Link to this post

    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.
  8. Stephen
    Stephen avatar
    1 posts
    Member since:
    Mar 2015

    Posted 16 Mar 2015 Link to this post

    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!
  9. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 19 Mar 2015 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017