0

I have youtube link into JW player. Everything works well. now how to put this player (this code) into 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>

could you give me an example , please?

  • possible duplicate of [JW Player in FancyBox](http://stackoverflow.com/questions/14767249/jw-player-in-fancybox) – JFK Apr 07 '13 at 17:28
  • No, that question was about "jwplayer 6 problem", version 6 have a bug. –  Apr 08 '13 at 12:11

1 Answers1

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>