Telerik Forums
Kendo UI for jQuery Forum
0 answers
70 views

Hi, Im using the kendo media player inside a kendo window for playing a video. I'm able to get the video and play it but the problem is when I check the Chrome devTools, I dont know why there is multiple request been made to the backend for the video. In fact I just click once.

screenshot

Below is the code:

var html = "<div id='dvPlayer' style='width:99%;height:99%;'></div>";
var mediaWind = $("<div id='mediawindow' />").kendoWindow({
        title: "Media Player",
        animation: false, width: "90%", height:"90%",
        resizable: false, modal: true, draggable: true,
        close: function ()
        {
                  this.destroy();
        }
}).data('kendoWindow').content(html);
                                  
var dvPlayer = $("#dvPlayer").kendoMediaPlayer({
        autoPlay: false,
        autoRepeat: false,
        navigatable: true,                       
}).data("kendoMediaPlayer");                          

 dvPlayer.media({
        title: filename,
        source: urlToBackend
});

mediaWind.center().open();

 

xion
Top achievements
Rank 1
 asked on 26 Aug 2021
0 answers
66 views

Hi, I use kendo ui for jquery media player in blazor project. On page load i call media player by this code;

await JSRuntime.InvokeAsync<string>("EmbedVideo", record.Id, record.Title);

and my javascript code is;

function EmbedVideo(recordId,title) {
    $("#mediaplayer").kendoMediaPlayer({
        autoPlay: true,
        navigatable: true,
        media: {
            title: title,
            source: "/api/record/GetRecordFile?recordId=" + recordId +"+&fileRequestType=1"
        },
        timeChange: function () {
            console.log('changed')
        }
    });
}

when i change time i can see the 'changed' log in console but video starting over again.

These ara my referances;

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.1.330/js/kendo.all.min.js"></script>
Thank you for all your help!
Esat
Top achievements
Rank 1
 asked on 25 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?