This is a migrated thread and some comments may be shown as answers.
Change URL
1 Answer 16 Views
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 13 Mar 2018, 02:18 PM

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?

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 15 Mar 2018, 10:58 AM
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.
Asked by
Marc
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or