Search code examples
javascriptjqueryvideointernet-explorer-9flowplayer

Flowplayer doesn't work in IE9


I have a flowplayer in a fancybox modal. Works in IE7/8 FF, and Chrome/Safari.

Having a issue with it not playing in IE9.

Here is my production code:

<div class="video">
                    <a class="video-popout" href="#video-player1342"><img id="ContentPlaceHolderDefault_CLMasterContentPlaceHolder_Multimedia_6_videoListView_videoThumbnail_1" src="/media/12112/diner_1011_thumb.jpg" alt="Click me!" style="height:164px;width:291px;" /></a>
                    <p class="title">Dinner Commercial</p>
                    <p class="posted-on">date added: <span><span id="ContentPlaceHolderDefault_CLMasterContentPlaceHolder_Multimedia_6_videoListView_dateAddedLabel_1">10/05/2011</span></span></p>
                    <p><span id="ContentPlaceHolderDefault_CLMasterContentPlaceHolder_Multimedia_6_videoListView_descriptionLabel_1"></span></p>
                    <div class="video-share">
                        <div class="addthis_toolbox addthis_default_style">
                            <a class="share-link" href="#">Share</a><span class="share-divider">|</span>

                        </div>
                    </div>

                    <div style="display:none">
                        <div id="video-player1342" style="width:542px;height:304px;border:1px solid #cb1000;padding:8px;">
                            <div class="player">
                               <object width="540" height="304" id="_player1" name="_player1" data="http://builds.flowplayer.netdna-cdn.com/79849/45776/flowplayer-3.2.7-0.swf" type="application/x-shockwave-flash"><param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"clip":{"url":"../media/12112/diner_1011.flv"}}' /></object>

                            </div>
                        </div>

                   </div>
            </div><!-- end video-->

I noticed in IE9 compatibility mode, selectivzr throws an error when you click my thumbnail preview to launch the modal.

Unable to get value of the property 'charAt': object is null or undefined selectivizr-1.0.1.min.js, line 5 character 2280

Could be unrelated,

Can anyone take a look and see whats going on?

You can also test on http://thecl.com/multimedia-gallery/videos.aspx

Thanks!


Solution

  • I've achieved the same effect with a very different approach, basically letting the flow player script do a load of the heaving and not directly embedding the videos in the page:

    <script type="text/javascript" src="/scripts/flowplayer/flowplayer-3.2.6.min.js"></script>
    <script>
       $(document).ready(function() {
    
            var vid;
            var player;
            $("#video_list a.click_button").click(function() { vid = $(this).attr("href"); }).fancybox({
                'href': '#video_content',
                'onStart': function() {
                    player = flowplayer("video_content", "/scripts/flowplayer/flowplayer-3.2.7.swf", vid);
                },
                'onCleanup': function() {
                    $('#video_content').html("");
                }
            });
    
        });
    
    
    </script>
    

    And now for the mark up

    <div id="video_list">
       <div>
            <img src="/images/tws_land/2011/ico_AndrewBlue.png" alt="">
            <p>"..There is real value in what Safety in the Market offer" - Andrew<br />
                <a href="/video/tws_AndrewB.flv" id="playflv" class="click_button">Play video</a>
            </p>                        
       </div>
       <div>
            <img src="/images/tws_land/2011/ico_MichaelBlue.png" alt="">
            <p>"..I&rsquo;ve learnt how to trade the stock market and the commodities market successfully, with a great deal of confidence" - Michael<br />
               <a class="click_button" href="/video/tws_MichaelC.flv">Play video</a>
            </p>
       </div>
       <div>
            <img src="/images/tws_land/2011/ico_BradBlue.png" alt="">
            <p>"..For the outlay, the rewards far outway the investment" - Brad<br />
               <a class="click_button" href="/video/tws_BradJ.flv">Play video</a>
            </p>
       </div>
       <div>
            <img src="/images/tws_land/2011/ico_YvonneBlue.png" alt="">
            <p>"..It&rsquo;s been a blessing to us, we&rsquo;re enjoying the new life we have as traders..
               and the freedom it brings" - Yvonne<br />
               <a class="click_button" href="/video/tws_YvonneP.flv">Play video</a>
            </p>
        </div>
     </div> <!-- END VIDEO LIST -->
     <div style="display:none;">
        <div id="video_content" style="width:800px;height:600px;">
     </div>
    

    I have this as a live demo, which I can confirm works with IE9