Video.js: VIDEOJS: ERROR: SyntaxError: Unexpected token ' in JSON at position 1

Created on 15 Mar 2017  路  3Comments  路  Source: videojs/video.js

Hello, I'm using and I get this error on my page :

video.js:81VIDEOJS: ERROR: SyntaxError: Unexpected token ' in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.SafeParseTuple [as default] (video.js:5)
    at Function.getTagSettings (video.js:81)
    at new Player (video.js:81)
    at videojs (video.js:81)
    at autoSetup (video.js:81)

The player is working well, but I don't know why I have this error in my console ? Thanks for help :)

Most helpful comment

@TheKassaK see #2022. You can't use ' (single quote) in JSON, only " (double quotes).

All 3 comments

It sounds like your data-setup property isn't valid JSON.

@TheKassaK see #2022. You can't use ' (single quote) in JSON, only " (double quotes).

In python you can use json.Dump(str) before send result to html template. with this command string convert to correct json format and send to html template. After send this result to JSON.parse(result) , this is correct response and you can use this.

https://stackoverflow.com/questions/37280274/syntaxerror-unexpected-token-in-json-at-position-0-in-react-app/48496840#48496840

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dingyaguang117 picture dingyaguang117  路  4Comments

kocoten1992 picture kocoten1992  路  4Comments

victorpfm picture victorpfm  路  4Comments

gfviegas picture gfviegas  路  3Comments

onigetoc picture onigetoc  路  4Comments