【问题标题】:Chromeless YouTube Video Player and Internet ExplorerChromeless YouTube 视频播放器和 Internet Explorer
【发布时间】:2016-05-06 04:40:57
【问题描述】:

Chromeless YouTube 视频播放器和自定义控件的这种实现不适用于 Internet Explorer 11。

我得到无限错误,例如:

“脚本 87:参数无效。www-embed-player.js (541,78)

有办法解决这个问题吗?谢谢

线路:541

Ii.prototype.sendMessage=function(a){this.source&&(a.id=this.sourceId,a=M(a),this.source.postMessage(a,this.origin))};function Ji(){}

video-player.js iframe 创建

var player;
function onYouTubePlayerAPIReady() {
  ytplayer = new YT.Player('player', {
    videoId: 'uu9J0c97fB0', 
    width: '640',       
    height: '390',        
    playerVars: {
      autoplay: 1,
      showinfo: 0,
      fs: 0
    },
    events: {
      'onReady': onPlayerReady,
      'onStateChange': onPlayerStateChange
    }
  });
} 

网页:https://github.com/brianyang/YouTube-Video-Player

【问题讨论】:

  • 您可能应该在 GitHub 上与该库的创建者联系。

标签: javascript jquery internet-explorer youtube youtube-api


【解决方案1】:

解决方案不是直接从电脑上的文件系统运行 video-demo.html,而是在本地网络服务器中运行。这仅用于 Internet Explorer 的安全性。如果你运行http://localhost/video-demo.html,它就可以工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-24
    • 1970-01-01
    • 1970-01-01
    • 2014-05-01
    • 1970-01-01
    • 2014-11-01
    相关资源
    最近更新 更多