media
Gets or sets the information about the media that is loaded in the widget.
Example
<div id="mediaplayer" />
<script>
$("#mediaplayer").kendoMediaPlayer({
media: { title: "Digital Transformation: A New Way of Thinking", source: "https://www.youtube.com/watch?v=gNlya720gbk" }
});
// get a reference to the media player widget
var mediaPlayer = $("#mediaplayer").data("kendoMediaPlayer");
// check the currently loaded media
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(mediaPlayer.media());
// change the media loaded in the widget
mediaPlayer.media({
title: "Responsive Website Delivers for Reeves Import Motorcars",
poster: "http://img.youtube.com/vi/DYsiJRmIQZw/1.jpg",
source: "https://www.youtube.com/watch?v=DYsiJRmIQZw"
});
</script>
Parameters
value Object
The media configuration to load in the MediaPlayer. Accepts the same values as the media option.
Returns
Object
The current media configuration.