0

我有 JW 播放器的 youtube 链接。一切正常。现在如何将此播放器(此代码)放入fancybox?

<div id="player_779">
  <embed type="application/x-shockwave-flash" 
  src="http://teodore.ge/site/content/scripts/mediaplayer/player.swf"
   width="640" height="383"
    style="undefined"  id="player_779"  name="player_779" 
    quality="high"  allowfullscreen="true"
    allowscriptaccess="always" wmode="opaque"
    flashvars="file=http://youtu.be/VHcrPImvWlk&amp;skin=http://teodore.ge/site/content/scripts/mediaplayer/nacht.zip&amp;autostart=true">
    </div>
</div>

请给我一个例子好吗?

4

1 回答 1

0
 <a  class='video' data-width="600" data-height="345" >link</a>

<script>
      $(".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 type="application/x-shockwave-flash"  src="http://ww.ge/site/content/scripts/mediaplayer/player.swf" width="640" height="383"    style="undefined"  allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="file=http://youtu.be/VHcrPImvWlk&amp;skin=http://www.ge/site/content/scripts/mediaplayer/nacht.zip&amp;autostart=true">'; 
        }
      });   
</script>
于 2013-04-07T01:13:14.030 回答