1

我正在尝试让 JW Player 在 Fancy Box 中工作。Fancy Box 在下面设置的尺寸下可以正常打开,但视频不显示(这是在服务器上)。我在页面上使用的示例链接(与脚本和内容目录处于同一级别 - mp4 在内容目录中)

<a href='content/brat.mp4' class='video' data-width="600" data-height="345" title='me'>Robot</a>

并在页面中:

    $(".video").fancybox({
    fitToView: false, // to show videos in their own size
    content: '<span></span>', // create temp content
    scrolling: 'no', // don't show scrolling bars in fancybox
    afterLoad: function () {
      // get dimensions from data attributes
      var $width = $(this.element).data('width'); 
      var $height = $(this.element).data('height');
      // replace temp content
      this.content = "<embed src='scripts/jwplayer/jwplayer.swf?file=" + this.href + "&autostart=true&amp;wmode=opaque' type='application/x-shockwave-flash' width='" + $width + "' height='" + $height + "'></embed>"; 
    }
  });

在 scripts/jwplayer/ 中有 jwplayer.flash.swf、jwplayer.js 和 jwplayer.html5.js

在此处输入图像描述

4

1 回答 1

0

排序...问题是 jwplayer 6。我下载了第 5 版,一切正常!

http://developer.longtailvideo.com/trac/browser/tags/mediaplayer-5.3#js

哎呀...

于 2013-02-11T02:12:07.360 回答