View Single Post
  #3  
Old 1st March 2013, 17:08
the_chapel the_chapel is offline
Junior Member
 
Join Date: Jan 2011
Posts: 1
Default

I found it only works to refresh the iframe using Jquery on window resize.

Code:
      <div id="livestreamPlayer">
              <iframe width="640" height="360" id='livestream' src="http://cdn.livestream.com/embed/cmslive01?layout=4&color=0xe7e7e7&autoPlay=false&mute=false&iconColorOver=0x888888&iconColor=0x777777&allowchat=false&width=640&height=360" style="border:0;outline:0" frameborder="0" scrolling="no"></iframe>
       </div>


$(window).resize(function () {
            // resize livestream player
            $('#livestream').attr('src', 'http://cdn.livestream.com/embed/cmslive01?layout=4&color=0xe7e7e7&autoPlay=false&mute=false&iconColorOver=0x888888&iconColor=0x777777&allowchat=false&width=640&height=360');
       
        });
Combined with using FitVids.js
Code:
$(document).ready(function(){
    $("#livestreamPlayer").fitVids({ customSelector: "iframe[src^='http://cdn.livestream.com']"});
});
Reply With Quote