Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error - expected identifier, string or number

    I just noticed that my pseudo-streaming movie code causes an error with IE7.

    I works fine with IE8, FireFox, Chrome... I have been looking on my own and found that it's likely a misplaced comma in my code, the other browser are debugging it, but IE7 will not. The error suggests it's where I have indicated below. I've tried removing the comma just after "about_us.jpg" and that causes the script to fail completely. Can anyone help me here, please?


    Code:
    <script type="text/javascript">
    //<![CDATA[
    
    flowplayer("player", {src: "http://www.mysite.org/flowplayer/flowplayer.commercial-3.2.5.swf", wmode: 'opaque'}, {
    	// product key from your account
    	key: '#$xxxxxxxxx',
    		   // configure clip to use "lighthttpd" plugin for providing video data
        playlist: [
    	{
            url: 'http://www.mysite.org/media/video/about_us.jpg',
    
        },  //<----error suggest here???
    	{
            url: 'http://www.mysite.org/flowplayer/streamer.php?file=about_us.flv',
            provider: 'lighttpd',
    		bufferLength: "2",
    		autoBuffering: false
        }],
    
        // streaming plugins are configured normally under the plugins node
        plugins: {
            lighttpd: {
                url: 'http://www.mysite.org/flowplayer/flowplayer.pseudostreaming-3.2.5.swf',
    
    			// use ${start} as a placeholder for the target keyframe
            queryString:escape('&start=${start}')
            }
        }
    });
    //]]>
    </script>

  • #2
    New Coder
    Join Date
    Feb 2008
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tried it again, removing that comma. Works now. Sorry!

    Code:
    <script type="text/javascript">
    //<![CDATA[
    
    flowplayer("player", {src: "http://www.mysite.org/flowplayer/flowplayer.commercial-3.2.5.swf", wmode: 'opaque'}, {
    	// product key from your account
    	key: '#$xxxxxxxxx',
    		   // configure clip to use "lighthttpd" plugin for providing video data
        playlist: [
    	{
            url: 'http://www.mysite.org/media/video/about_us.jpg',
    
        },  //<----error suggest here???
    	{
            url: 'http://www.mysite.org/flowplayer/streamer.php?file=about_us.flv',
            provider: 'lighttpd',
    		bufferLength: "2",
    		autoBuffering: false
        }],
    
        // streaming plugins are configured normally under the plugins node
        plugins: {
            lighttpd: {
                url: 'http://www.mysite.org/flowplayer/flowplayer.pseudostreaming-3.2.5.swf',
    
    			// use ${start} as a placeholder for the target keyframe
            queryString:escape('&start=${start}')
            }
        }
    });
    //]]>
    </script>

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    The comma at the end of THIS line is the wrong one:
    Code:
           url: 'http://www.mysite.org/media/video/about_us.jpg',
    The other comma is fine.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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