Bonjour,

J'aimerais afficher sur mon site un espace avec une vidéo dailymotion qui changerais a chaques actualisation de la page !

J'ai le script pour afficher une video

<script>
    // This code loads the Dailymotion Javascript SDK asynchronously.
    (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);
    }());

    // This function init the player once the SDK is loaded
    window.dmAsyncInit = function()
    {
        // PARAMS is a javascript object containing parameters to pass to the player if any (eg: {autoplay: 1})
        var player = DM.player("player", {video: "x1bpnpt", width: "640", height: "360", params: {autoplay: 1}});

        // 4. We can attach some events on the player (using standard DOM events)
        player.addEventListener("apiready", function(e)
        {
            e.target.play();
        });
    };
</script>

HTML:

<div id="player"></div>

Voila le probleme c'est que je ne sait pas comment faire !

Pouvais vous m'aidez ? s'il vous plait !!

Aucune réponse