Okay
  Public Ticket #494293
Video embeds not displaying correctly
Closed

Comments

  • Mike started the conversation

    Hi,

    Using video embed widgets on Homepage in Left and Middle columns.

    All display correctly, but if I navigate to another page and then use the back button, the video slots all display the same random video, 'Life at Imperial or 'Medschool 101' for instance.

    Please investigate urgently.


  •  93
    djwd replied

    Hi,

    I go back and forth from the homepage but always the same three videos are showing up to me (as expected). Please try on a different browser/machine if you get the chance, and/or possibly provide the steps to replicate this, thank you.

    Regards
    djwd

    Regards
    djwd

  • Mike replied

    Hi

    Works OK on PC/Firefox and iPad/Safari and PC/InternetExplorer

    Produces problem described on PC/Chrome

    From Homepage go to any page on the menu such as Hotzoc Tour or Forum Members. Then click the back button and all the Homepage videos show the same video.

    I looked at your demo site but could not find a page that had multiple videos on it using the MightyMag video embed widget.

  •    djwd replied privately
  •   Mike replied privately
  •  93
    djwd replied

    HI there,

    digging this some further it turned out to be a Chrome bug related to iframes and the back button.

    Until they fix the issue (hopefully), I found a workaround by setting a unique name attribute to the iframes output.

    Open inc/widgets/wg-sidebar.php, from line 432. Replace the following:

    <div class=\"videostream\">
        <?php if($type == \'Youtube\') { ?>
        <iframe width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/<?php echo $id; ?>?rel=0\" frameborder=\"0\" allowfullscreen></iframe>
        <?php } elseif($type == \'Vimeo\') { ?>
        <iframe src=\"http://player.vimeo.com/video/<?php echo $id; ?>?title=0&byline=0&portrait=0&color=ba0d16\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
        <?php } elseif($type == \'Dailymotion\') { ?>
        <iframe frameborder=\"0\" src=\"http://www.dailymotion.com/embed/video/<?php echo $id ?>?logo=0\"></iframe>
        <?php } ?>
    </div>

    with:

    <div class=\"videostream\">
        <?php if($type == \'Youtube\') { ?>
        <iframe name=\"youtube_<?php echo $id; ?>\" width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/<?php echo $id; ?>?rel=0\" frameborder=\"0\" allowfullscreen></iframe>
        <?php } elseif($type == \'Vimeo\') { ?>
        <iframe name=\"vimeo_<?php echo $id; ?>\" src=\"http://player.vimeo.com/video/<?php echo $id; ?>?title=0&byline=0&portrait=0&color=ba0d16\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
        <?php } elseif($type == \'Dailymotion\') { ?>
        <iframe name=\"dailymotion_<?php echo $id ?>\" frameborder=\"0\" src=\"http://www.dailymotion.com/embed/video/<?php echo $id ?>?logo=0\"></iframe>
        <?php } ?>
    </div>

    Tested out on the staging area and it seems to fix the issue. The fix will included in next theme version.

    Hope that helps,

    Regards
    djwd

    Regards
    djwd

  •   Mike replied privately
  •  93
    djwd replied

    HI there,

    I don\'t usually do this although I tried to login couldn\'t find the theme folder. I attach the modified file to replace in your inc/widgets directory.

    Please make sure you\'re clearing any possible cache you might have (CDN/Plugins/Browser).

    Regards
    djwd

    Regards
    djwd