我想使用dailymotion Player API,并且帖子消息不适用于ie9(Windows 7)。
var dmplayer = document.getElementById("dmplayer");
var source = null;
var origin = null;
var postMessageListener = function (e) {
if(source == null && (e.origin === "http://www.dailymotion.com" || e.origin === "https://www.dailymotion.com")){
source = e.source;
origin = e.origin;
}
};
window.attachEvent("onmessage", postMessageListener); //ie9 only
<iframe style="position:absolute;height:100%;width:100%;top:0;left:0;padding:0;margin:0;" src="http://www.dailymotion.com/embed/video/x2m8jpp?api=1&wmode=opaque" id="dmplayer" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
运行时出现source.postMessage('play', origin)
此错误:
对象不支持属性或方法“ apply” x2m8jpp?api = 1&wmode = opaque,第1行字符1
有没有人有办法解决吗?
谢谢。
已经在这里修复:https : //github.com/dailymotion/dailymotion-sdk-js/commit/0f5d595aa51b00fc7c4e13497505c4a0d1a902c2
请尝试使用最新的SDK版本
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句