thibauts / node-castv2

An implementation of the Chromecast CASTV2 protocol
MIT License
765 stars 99 forks source link

no receive message (node v0.12.x) #12

Closed xat closed 9 years ago

xat commented 9 years ago

Hey there :)

When sending for example a PAUSE command on node v0.10.x you normaly instantly get a receive message:

SEND:
castv2 send message: protocolVersion=0 sourceId=client-789231 destinationId=web-39 namespace=urn:x-cast:com.google.cast.media data={"type":"PAUSE","mediaSessionId":1666547486,"requestId":11} +1s

RECEIVE:
castv2 recv message: protocolVersion=0 sourceId=web-39 destinationId=client-789231 namespace=urn:x-cast:com.google.cast.media data={"type":"MEDIA_STATUS","requestId":11,"status":

On node v0.12.x (and I guess also on io.js) often the receive message never comes back. On higher level libs this results to callbacks which never get triggered:

player.pause(function() {
    // never gets called because of missing receive message.
});

already investigated some time into this, but didn't find the cause of this issue yet.

xat commented 9 years ago

Actually there seems to be something blocking the event-loop. I'm not sure if that happens within castv2 or somewhere else (so might not be a castv2 issue).

xat commented 9 years ago

Okay, the problem definitly is somewhere else.