...

View Full Version : error - expected identifier, string or number



wkilc
01-15-2012, 02:22 AM
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?



<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>

wkilc
01-15-2012, 02:25 AM
Tried it again, removing that comma. Works now. Sorry!


<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>

Old Pedant
01-15-2012, 03:16 AM
The comma at the end of THIS line is the wrong one:


url: 'http://www.mysite.org/media/video/about_us.jpg',
The other comma is fine.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum