diff --git a/src/components/jellyfinActions.ts b/src/components/jellyfinActions.ts index 13b594ca..6da104b4 100644 --- a/src/components/jellyfinActions.ts +++ b/src/components/jellyfinActions.ts @@ -1,4 +1,4 @@ -import { ajax } from './fetchhelper'; +import { ajax } from './fetchhelper'; import { getUrl, diff --git a/src/components/maincontroller.js b/src/components/maincontroller.js index eb7dd255..70bb5af0 100644 --- a/src/components/maincontroller.js +++ b/src/components/maincontroller.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable */ import { reportPlaybackProgress, @@ -488,6 +488,13 @@ window.castReceiverContext.addCustomMessageListener( var data = evt.data; + // Apparently chromium likes to pass it as json, not as object. + // chrome on android works fine + if (typeof data == 'string' || data instanceof String) { + console.log('Event data is a string.. Chromium detected..'); + data = JSON.parse(data); + } + data.options = data.options || {}; data.options.senderId = evt.senderId; // TODO set it somewhere better perhaps