我刚刚申请了 Dailymotion 发布者网络。我有一个网站,我使用这个 javascript 播放所有 Dailymotion 视频。
<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: "x27rzcj_", width: "728", height: "410", autoplay: 1});
// 4. We can attach some events on the player (using standard DOM events)
player.addEventListener("ended", function(e)
{
document.getElementById('player').style.display = 'none';
$("#videorol").fadeIn("fast");
});
};
根据 Dailymotion Publisher,我必须将联合参数插入 iframe src。我怎样才能通过使用 javascript sdk 来实现这一点?谢谢