Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compatible with chromium 83 #86

Merged
merged 2 commits into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/jellyfinActions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ajax } from './fetchhelper';
import { ajax } from './fetchhelper';

import {
getUrl,
Expand Down
9 changes: 8 additions & 1 deletion src/components/maincontroller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/* eslint-disable */
YouKnowBlom marked this conversation as resolved.
Show resolved Hide resolved

import {
reportPlaybackProgress,
Expand Down Expand Up @@ -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
Expand Down