Change URL

2 posts, 0 answers
  1. Marc
    Marc avatar
    171 posts
    Member since:
    Sep 2016

    Posted 13 Mar Link to this post

    I'd like to allow users to dynamically change the URL of the media player.

    I have tried to destroy the widget and recreate it but I get an error.

    $("#mediaplayer").data("kendoMediaPlayer").destroy();

    "VM66743:62 Uncaught TypeError: Cannot set property 'ontimeupdate' of undefined"

    How can I update the URL of the media player and refresh the player to play the new URL?

     

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2119 posts

    Posted 15 Mar Link to this post

    Hi Marc,

    In order to change the video that is played by the MediaPlayer widget I would suggest using the media() method. With it you can specify the url and other options for the new media that will be displayed.

    Check out the sample below that outlines the behavior. 


    Give the approach a try and let me know how it works for you.


    Regards,
    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top