reveal.js icon indicating copy to clipboard operation
reveal.js copied to clipboard

Speaker notes plugin errors in console with Seminar plugin

Open markNZed opened this issue 2 years ago • 0 comments
trafficstars

I've been trying to get the speaker notes working with the Seminar plugin, it is hard to find the cause of this issue. The speaker notes plugin generates an error in the host presentation when a participant joins a room SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data plugin.js:179 the related code is data = JSON.parse(event.data); locally I modified this to catch the error and console.log(JSON.parse(JSON.stringify(event.data))) provides {"target":"metamask-inpage","data":{"name":"metamask-rovider","data":{"method":"metamask_chainChanged","params":{"chainId":"0x1","networkVersion":"1"}}}} Where might this be coming from? In any case if the message is not formatted in a way that the notes plugin can interpret it then should it just ignore this rather than error? Basically the JSON.parse could be in a try/catch block. The string is valid JSON so it is might be related to something like https://stackoverflow.com/questions/32635585/json-parse-error-on-a-seemingly-valid-json where an object is treated as a JSON string. The more I look at it the more I think the code should be data = event.data;

markNZed avatar Mar 10 '23 17:03 markNZed