SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JWPlayer Dynamic Playlist Not Working IN IE9, IE8, or IE7!

    I have just finished a page where users can select up to three different items to see a comparison video. When the compare button is hit, a lightbox launches and a custom playlist is sent to JW Player.

    The script works perfectly in FF, Chrome, and Safari. I am using JQuery in addition to the JWPlayer. The video portion of the script does not work in any IE version, 9, 8, or 7. The rest of the script (user interface) works fine in IE.

    Any ideas on what the problem might be? FWIW I have a single video file on another page of the site that plays fine in IE 7-9.

    Here is what I think the relevant code is. Any help would be much appreciated!

    Code JavaScript:
    // Load JW Player
    jwplayer('video-player').setup({
    'flashplayer': '<?php echo $skinUrl; ?>frontend/default/jm_fashira/js/jwplayer/player.swf',
    'id': 'player-id',
    'width': '720 ',
    'height': '406',
    'controlbar.position': 'none',
    'repeat': 'list',
    'autostart': 'true',
    events: {
    onComplete: function() {
    if (this.getPlaylist().length == this.getPlaylistItem().index + 1)
    { // Time To Get Out Of Dodge
    $('#video-wrapper').fadeOut('slow');
    $('#overlay').fadeOut('slow');
    $('#lightbox-close').fadeOut('slow');
    $('body').css('overflow-y', 'visible');
    }
    }
    }
    });
     
    $('#compare-btn').click(function(event)
    {
    event.preventDefault();
    // Validate
    if ($('#compare-form input').length == 0)
    {
    alert('Please Select Up To Three Violins To Compare.')
    }
    else
    { // Reveal Lightbox Divs
    $('body').css('overflow-y', 'hidden');
    $('#overlay').css('top', $(document).scrollTop()).css('opacity', '0.85');
    $('#overlay, #lightbox-close').fadeIn('slow');
    // Reveal The Video Player
    $('#video-wrapper').show('slow', function()
    {
    jwplayer('video-player').onReady(function(event)
    { // Create The Playlist
    var playlist = jwplayer().getPlaylist();
    playlist.length = 0;
    $.each($('#compare-form').serializeArray(), function(i, field)
    {
    var newItem =
    {
                file: '<?php echo $mediadir;?>comparison_videos/mp4/' + field.value + '.mp4'
            };
    playlist.push(newItem);
    }
    );
            jwplayer().load(playlist);
    }
    );
    }
    );
    }
    }
    );

  2. #2
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump... For any ideas before I rewrite it w/ AJAX.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •