Change URL

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

    Posted 13 Mar 2018 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.


    "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
    Viktor Tachev avatar
    2469 posts

    Posted 15 Mar 2018 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.

    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