mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
onMessageReceived implemented
This commit is contained in:
parent
7e223b84f0
commit
9b3ce2f31c
1 changed files with 4 additions and 2 deletions
|
|
@ -37,8 +37,10 @@ function Chromecast() {
|
||||||
function onCastStateChanged() {
|
function onCastStateChanged() {
|
||||||
events.emit(cast.framework.CastContextEventType.CAST_STATE_CHANGED);
|
events.emit(cast.framework.CastContextEventType.CAST_STATE_CHANGED);
|
||||||
}
|
}
|
||||||
function onMessageReceived(event) {
|
function onMessageReceived(_, message) {
|
||||||
|
try {
|
||||||
|
events.emit('message', JSON.parse(message));
|
||||||
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
function onSesstionStateChanged(event) {
|
function onSesstionStateChanged(event) {
|
||||||
switch (event.sessionState) {
|
switch (event.sessionState) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue