I want to call a video in an ajax request, it works, but not in different ways (it lacks the video player control buttons)
Here is my ajax code:
$.ajax({
context: document.body,
url: "/?get=json&act=video",
type: "get",
success: function(html) {
var a = JSON.parse(html);
var returnVideo = "";
a.forEach(function(element) {
console.log(element);
returnVideo += ' <div class="uk-card uk-card-hover uk-card-default">';
returnVideo += ' <div class="uk-card-media-top">';
returnVideo += ' <video width="" height="">';
returnVideo += ' <source src="'+element.gameClipUris[0].uri+'" type="video/mp4">';
returnVideo += ' </video>';
returnVideo += ' </div>';
returnVideo += ' </div><br />';
});
$('#loading').hide("slow");
$('#retourForm').append(returnVideo);
}
});
Output:

He has no video player control buttons!
I have a test to add a player with a hardcoded url and it works (right on the image) ...

So, I can not load the html5 player from javascript?
source
share