handle different message types from chromecast

This commit is contained in:
Luke Pulverenti 2016-03-30 14:32:25 -04:00
parent 73f453f22a
commit 9bee9b17bf

View File

@ -154,7 +154,9 @@
CastPlayer.prototype.messageListener = function (namespace, message) {
message = JSON.parse(message);
if (typeof (message) === 'string') {
message = JSON.parse(message);
}
if (message.type == 'playbackerror') {
@ -180,7 +182,6 @@
}
else if (message.type) {
Events.trigger(this, message.type, [message.data]);
}
};