Topic: Bad GUIDs from discover, from jQuery

If I do a fling/discover from jQuery, I get weird values for GUIDs:


but when I use curl or perl I get good GUIDs.  The jQuery calls seem to return something that is encoded or encrypted.  My jQuery call looks like:

$.ajax({ url: 'http://flingo.tv/fling/discover',
  data: {},
  type: 'POST',  // I tried GET too
  dataType: 'jsonp',
  success: good_fcn,
  error: bad_fcn


Re: Bad GUIDs from discover, from jQuery

I may know the answer to this: but it depends; can I fling to an ephemeral GUID?  I'll have to try...


Re: Bad GUIDs from discover, from jQuery

No, I cannot fling to an ephemeral guid:

  "error": {
    "message": "Cannot fling using ephemeral guids",
    "code": 8004

So, I don't get the concept.  I want to be able to discover fling-enabled devices on my network and then fling to them from the device that did the discovery.  Is this not possible?


Re: Bad GUIDs from discover, from jQuery

After re-reading the security model blurb, I understand now.  Its the missing Referer header in the ajax call that is identifying me as untrustworthy, which I can understand.


Re: Bad GUIDs from discover, from jQuery

Do the announce from the web page using JSONP.  It identifies services on the same network of where the request comes from. 



Re: Bad GUIDs from discover, from jQuery

The security model is in place to prevent random web sites from spamming a person's queue.

For an application (not a web page) to add to the queue is easy, simply don't include a referer header on the fling call.  Presumably applications have to be installed and can be uninstalled and thus are somewhat more trustworthy.

For a web page to fling requires either using a trusted intermediary, e.g., flingo.tv by using flingo.tv/fling/a OR becoming a trusted intermediary.

I can add a domain as a trusted intermediary if the people or entity behind the domain agree not to abuse it.



Re: Bad GUIDs from discover, from jQuery

I am doing JSONP (see original post).  But there is something about a browser not sending Referer header for cross-domain jsonp calls, I believe (its been a few days, and my mental cache is flushed).


Re: Bad GUIDs from discover, from jQuery

Oops, we just cross posted!  Yeah, so I understand.  It's not presently an issue for me.  I just didn't understand how things were supposed to work, but I have a better idea now.