I have an embed dailymotion video inside a web page. I use the code below to display it. This code call the preview picture of the video through HTTP instead of HTTPS whereas web page domain is on HTTPS.
API call is well sent with HTTPS protocol :
document.location.protocol
Due to this, all ressources into the web page are not sent through HTTPS and Chrome display a warning on the SSL certificate.
<script>
// Dailymotion SDK
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//api.dmcdn.net/all.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
}());
window.dmAsyncInit = function()
{
var player = DM.player("player", {video: "x254e00", width: "480", height: "270"});
player.addEventListener("play", function(e)
{
$('.video_layer').hide();
});
};
Do you have an idea, how to force this HTTPS call for picture preview ?