Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

javascript error: missing : after property id

44 replies [Last post]
Reply

I'm using Wowza 2.2.3 to restream a feed from our Axis P1344-E network camera using JW Flash Player 5.6.1768. I followed all the instructions on Wowza's site and everything appeared to be working great at first.

Then I noticed the following javascript error:

Error: missing : after property id

The error seems to point to a spot in the jwplayer.js file but it's hard to tell where because of the format of the js code.

The strange thing is I can substitute an on-demand video in the "file" attribute and leave the rest of the embed code alone and there is no javascript error.

Also strange is the fact that this javascript error doesn't affect the playback of the live stream at all - it's just bothersome to see that error.

The searching I've done says that this error usually points to a hyphen inside a property name that's not inside quotes or something similar, but I don't have that anywhere in my embed code.

Anyway, here is my embed code, along with a link that exhibits the problem. Any help would be great - thanks!

http://www.cedarville.edu/Advancement/Health-Sciences-Center/Webcam-Video.aspx

jwplayer("videoframe").setup({
width: 720,
height: 450,
autostart: true,
stretching: "fill",
controlbar: "over",
modes: [
{
type: "flash",
src: "/lib/swf/player.swf",
config: {
'provider': 'rtmp',
'streamer': '[address of our streaming server]',
'file': 'camera.stream'
}
}
]
});
Reply

I am not able to replicate the error. It works for me and there are no errors at all.

Reply

Huh, I can still see it. It's noticeable in Firefox (with firebug installed) or in IE 8 (which is the majority browser used to view our site). It shows up as that familiar yellow triangle with an exclamation point in the left side of the status bar. Here's the error in it's full form. This is what the web developer addon for Firefox outputs:

Error: missing : after property id
Source File: http://www.cedarville.edu/Advancement/Health-Sciences-Center/Webcam-Video.aspx
Line: 0, Column: 407
Source Code:
try { __flash__toXML(function(dat) { jwplayer("videoframe").dispatchEvent("jwplayerMediaMeta", dat); }(({metadata:({width:1280,displayHeight:800,height:800,videocodecid:"avc1",trackinfo:[({description:"{H264CodecConfigInfo: profile: \"Baseline\", level: 4.1, frameSize: 1280x800, displaySize: 1280x800, PAR: 1:1}",type:"video",sampledescription:[({sampletype:"H264"})],language:"eng",timescale:90000,profile-level-id:"420029",sprop-parameter-sets:"Z0IAKeKQCgDLYC3AQEBpB4kRUA==,aM48gA=="})],version:"5.6.1768",rtpsessioninfo:({attributes:({range:"npt=0.000000-"}),timing:"0 0",emailaddress:"NONE",origin:"- 1304619331365696 1304619331365696 IN IP4 webcam5.cedarville.edu",name:"Media Presentation",protocolversion:"0"}),id:"videoframe",type:"metadata",frameWidth:1280,client:"FLASH WIN 10,2,152,32",frameHeight:800,displayWidth:1280})}))) ; } catch (e) { "<undefined/>"; }
Reply

Weird, I have Firefox and Firebug. No error. Can you try to update Flash?

Reply

Hmm, that is weird. I updated to the latest Flash player (10.2.159.1) and it still shows up for me. On a long shot I tested it from outside our network, but I still saw the error.

I downloaded and published the latest debug version of jwplayer.js to our testing environment and I can actually tell you a line number now. Perhaps this might give you some clue even though you can't see the error yourself. Anyway, here's what the firebug console says now:

missing : after property id
extend()jwplayer.js (line 55)
(?)(data=Object { metadata={...}})jwplayer.js (line 2125)
dispatchEvent(type="jwplayerMediaMeta")jwplayer.js (line 2057)
try { __flash__toXML(function(dat) { j...}))) ; } catch (e) { "<undefined/>"; } jwplayer.js (line 55)

Thank you very much for still responding to my posts! I know how difficult it can be to troubleshoot a problem when you can't replicate it.

Reply

Ah, I got it now:

missing : after property id
[Break On This Error] ConfigInfo: profile: \"Baseline\", lev...ription:[({sampletype:"H264"})],profil

Where is this code loading from ?

Reply

The jwplayer.js is being loaded from here:

http://www.cedarville.edu/lib/jwplayer.js

So in the head of the page that has the webcam feed, I'm loading it like this:

<script type="text/javascript" src="/lib/jwplayer.js"></script>

The embed code is also referenced in the document head inside a jQuery .ready() block:

<script type="text/javascript" src="/lib/webcam5.js"></script>
Reply

I mean where is - ConfigInfo loaded from?

Reply

Oh - I actually have no idea what that is or where it's coming from. If you look at the js files I mentioned above that is all I'm using to embed the video. I wouldn't think that would be coming from Wowza, but I could be wrong. I followed the instructions on this page to set things up on that end:

http://www.wowzamedia.com/forums/content.php?39

On another note, if I use the SWFObject method of embedding the JWPlayer then no JS error is returned. So if we can't figure out where the sticking point is with jwplayer.js I guess I'll just go that route.

Reply

Maybe there is something else on the page that is causing this. Can you put up the player on a blank test page?

Reply

Ok, here is the blank test page with the live video. This page is also using the debug version of jwplayer.js.

http://www.cedarville.edu/test/webcam/

FYI, since this test page is up now, the original link I posted in this thread is using SWFObject so an error isn't showing on our publicized page.

Thanks!

Reply
Reply

Published with the latest versions of both, and the error still seems to be there....

Reply

Okay, this has to be coming from your jQuery. Can you remove jQuery and just embed the player normally?

Reply

Unfortunately that still isn't it. I even streamlined the embed method a bit (removed the "Modes" portion) just in case that was an issue for some strange reason.

Like I said originally, this error only occurs while restreaming the live feed from our Axis webcam through Wowza. To help illustrate this, I set up links at the top of the page for both the live video and on-demand video (both are using Wowza):

http://www.cedarville.edu/test/webcam/

Again I really appreciate all your time helping to try to figure this out. If you just want to chalk it up to our environment then I'd be ok with that. I'll just use SWFObject for our live feeds for now. If not I'm more than happy to help troubleshoot this as much as possible. I just don't want to seem like I'm really pushing you for an answer. If it can help you though, then we can keep at it.

Thanks!

Reply

Hi, eric you're not alone. We've got the same JavaScript error in similar setup: live stream from Wowza Media Server 2.2.4 + licensed JW Player 5.5 through JW Player embedder. Switching back to SWFObject probably isn't an option in our case, because we'll need JW Player JavaScript API.

Reply

Hey guys, this seems to be an issue. We are going to investigate, thanks.

@eric - please leave the test page up so we can take a look.

Reply

@eric -

It appears as though this error message is appearing due to a piece of metadata coming from the server. The player attempts to pass this metadata into the JavaScript API, but Flash is choking on the Flash-to-JavaScript object conversion. The metadata in question is:

trackinfo: [
  {
    description: "{H264CodecConfigInfo: profile: "Baseline", level: 4.1, frameSize: 1280x800, displaySize: 1280x800, PAR: 1:1}",
    ...
  }
]

For some reason, either Flash or the browsers' JavaScript interpreters are unable to parse that string (possibly because of the double quotes around "Baseline" but I'm not sure) and so the error message is thrown.

I think this is a small enough problem that it can be safely ignored. If you still want to resolve the problem, I would prevent your live stream from sending out that particular bit of metadata.

Reply

@PabloS
Is possible to escape that double qoutes on player side, before conversion to JavaScript? Could you point JW Player source file where conversion takes place?

Reply

@j.bilski -

I'm not 100% sure the double quotes are the problem; that was just a guess, but I haven't investigated.

The conversion takes place in the player's JavaScript API - the JW Embedder has an internal metadata event listener. The internal callback function (listenerCallbackMedia) can be found here:

http://developer.longtailvideo.com/trac/browser/trunk/fl5/src/com/longtailvideo/jwplayer/player/Java...

Reply

@PabloS -

Interesting. I imagine the unescaped quotes would be the issue, but I have no idea how to go about preventing Wowza from sending that information. For me at least I think I'll continue to use SWFObject in cases of live streams.

If I come across a way to stop Wowza from sending metadata or a way to escape those quotes, I'll be sure to post here again. Thanks!

Reply

@eric -

Sounds good. Looking forward to seeing what you discover.

Reply

Quick tests prooved, that either erasing metadata on server (in onMetadata event) or player side (in listenerCallbackMedia) eliminates the error - but they aren't satisfying solutions.

Maybe it's the ActionScript's ExternalInterface.call() behaviour described here:
http://zastita.com/079314/the-other-reason-to-beware-externalinterfacecall.html ?

If it is, '\' character will need escaping on player side, before ExternalInterface.call().

Reply

Hi again,

could you investigate ExternalInterface.call() behaviour mentioned in my previous post?

Question about temporary solution:
If I alter JavaScriptAPI::listenerCallbackMedia(evt:MediaEvent):Object line 227:
if (evt.metadata != null) returnObj.metadata = JavascriptSerialization.stripDots(evt.metadata);
to returnObj.metadata = null, will it break something else than external calling of getMeta() on JavaScript side?

Reply

Hey,

I am also seeing this problem streaming from Red5 + shoutcast app, seemingly from metadata conversion with double quotes.

Reply

Do you have a link...?

Reply

Hi guys! I think i have similar problem. When i pass to play or pause->play i get this error:

missing : after property id try { __flash__toXML(function(dat) { j...}))) ; } catch (e) { "<undefined/>"; }

We use wowza media server 2.2.4

You can see this error on some pages in our site.
For example http://www.livetv.az/kanals/

Reply

We use latest licensed JW Player

Reply

I am not able to replicate this issue on your site. No errors at all.

Reply

@Ethan

I've just tried link from motakujl: http://www.livetv.az/kanals/
in Firefox 4.0.1 (ubuntu) + Firebug 1.7.1. Firebug console needs to be enabled when video is loading.

Error on console:

missing : after property id
try { __flash__toXML(function(dat) { j...}))) ; } catch (e) { "<undefined/>"; }

That's probably the same issue in AS's ExternalInterface.call() I've described earlier.

Reply

I have the console enabled. I have the latest version of Firebug. The only difference is that I am using XP.

I am now getting a slightly different error though:

missing : after property id
, displaySize: 785x576, PAR: 12:11, fr...KMqAhJIA"})],client:"FLASH WIN 10,2,15

He seems to be doing a lot of custom JS though...that might be the culprit here.

Reply

Hi again,

I've finally managed to find the culprit causing that error, thanks to: http://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/.

JavaScript doesn't allow object properties names with hyphens (like: some-property) without double qoutes around it ("some-property"). ExternInterface.call doesn't add double qoutes when translating property names between Flash and JS.

My solution is to replace all occurences of "-" character in property names to "_". It is safe, because in the end player isn't using that properties at all.

Here's modified version of com.longtailvideo.jwplayer.utils.JavascriptSerialization::stripDots method (based on source code from JW Player 5.3), which is called every time metadata is being passed to JS:

public static function stripDots(obj:Object):Object {
    // Todo: create nested objects instead of removing the dots
   
    var newObj:Object = (obj is Array) ? new Array() : new Object();
    for (var i:String in obj) {
        if (i.indexOf(".") < 0) {
            var propertyName = i.replace( /\-/g, "_" );
            var isObject = ( typeof( obj[i] ) == "object" );
   
            newObj[propertyName] = isObject ? stripDots( obj[i] ) : obj[i];
        }
    }
    return newObj;
}

Hope it helps.

Reply

Thanks. I am going to pass thing along.

Reply

I have created a ticket to address this issue:

http://developer.longtailvideo.com/trac/ticket/1353

Reply

I know this is supposed to be fixed, but I am having the same trouble. We are also restreaming an Axis camera through Wowza 2.2.4. Here is a stripped down page and the JS error:

http://www.tripsmarter.com/lucas/jw_player_error.htm

Error: missing : after property id
Source File: http://www.tripsmarter.com/lucas/jw_player_error.htm
Line: 0, Column: 420
Source Code:
try { __flash__toXML(function(dat) { jwplayer("mediaspace").dispatchEvent("jwplayerMediaMeta", dat); }(({metadata:({id:"mediaspace",type:"metadata",videocodecid:"avc1",height:360,frameHeight:360,rtpsessioninfo:({name:"Media Presentation",emailaddress:"NONE",origin:"- 1317167960516115 1317167960516115 IN IP4 24.96.23.95",protocolversion:"0",attributes:({range:"npt=0.000000-"}),timing:"0 0"}),trackinfo:[({profile_level-id:"420029",sprop_parameter-sets:"Z0IAKeKQFAX/LgLcBAQGkHiRFQ==,aM48gA==",type:"video",sampledescription:[({sampletype:"H264"})],language:"eng",timescale:90000,description:"{H264CodecConfigInfo: profile: \"Baseline\", level: 4.1, frameSize: 640x360, displaySize: 640x360, PAR: 1:1, crop: l:0 r:0 t:0 b:4}"})],displayHeight:360,displayWidth:640,width:640,client:"FLASH WIN 10,3,183,7",version:"5.7.1896",frameWidth:640}),type:"jwplayerMediaMeta"}))) ; } catch (e) { "<undefined/>"; }

Reply

I'm also experiencing this, using v5.7.1864 of the player and associated JavaScript:

http://www.midaslabs.co.uk/gradtest/

missing : after property id
try { __flash__toXML(function(dat) { jwplayer("mediaspace").dispatchEvent("jwplayerMediaMeta", dat); }(({type:"jwplayerMediaMeta",metadata:({copyright:"My Copyright",transmitter name:"Flash",contact phone:"",information url:"",stream name:"Flash",version:"5.7.1864",contact name:"",contact email:"",author:"My Author",keywords:"vbrick",program:"H Program 1",type:"metadata",client:"FLASH WIN 11,1,102,55",category:"",information:"VBrick Streaming Video",creationdate:"FRI DEC 02 12:20:04 2011n",id:"mediaspace",presetname:"Custom"})}))) ; } catch (e) { "<undefined/>"; }

I've tested v5.8.2011 and get the same error.

It looks like some of the property names contain spaces, rather than dashes in the original report on this thread.

So, is it possible that the com.longtailvideo.jwplayer.utils.JavascriptSerialization::stripDots method could be updated to replace spaces as well as dots and dashes?

Reply

@John -

You're absolutely right. The spaces in the metadata field names are what's causing the issue. I'll add that use case to the JavaScriptSerialization class, but it seems like an odd use case to me. Perhaps this is something you can address in your RTMP application?

http://developer.longtailvideo.com/trac/ticket/1549

Reply

FYI, I incurred a similar error while live-streaming with Axis/Wowza/JWPlayer 5.7.1953 ("missing : after property id").

The error indicated the problem was with the hyphen in the following property name: sprop_parameter-sets

It looks like the hyphen issue was addressed by 5.7.1953, according to the bug report?
http://developer.longtailvideo.com/trac/ticket/1353

I just downloaded JWPlayer 5.8.2011 and it produced another "missing : after property id" error on the following property name:
profile_level-id

Reply

This should be fixed in the latest build of the player. Since the sample stream has been taken down though, this will go untested.

Reply

Hi Pablo.

I've just tested version 5.9.2080 of the jwplayer.min.js and player.swf files that I got from here:

http://developer.longtailvideo.com/trac/changeset/2080

I still get the JavaScript error because of spaces in the metadata field names. Is it possible that the fix hasn't worked or have I not got the correct version of the files?

Shall I arrange for our stream to be activated again so that you can do your own testing?

Reply

@John -

Yes, could you set up the test stream again, and ping me once it's up?

Reply

Hi Pablo

Our feed is running again. Here's my test page:

http://preview.tinyurl.com/72tqmmw

The player is set to auto-start on page load so you should see the JavaScript error almost straight away. However, the player only seems to be picking up the feed some of the time (probably an issue with our streaming server) so please just refresh the page until it plays. The video content is just a black screen, by the way.

Reply

@John -

Thanks for the test stream. I was able to replicate the problem, and I have another fix in place (5.9.2116 is the latest revision). Want to give it a try?

Reply

Hi Pablo

I've just downloaded and tested with 5.9.2118 (at the same URL as earlier) and the JavaScript error is no more. Thanks for continuing to look into this and fixing it.

Am I correct in assuming that you got this in just in time for the official 5.9 release?

Reply

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options