player icon indicating copy to clipboard operation
player copied to clipboard

`:key-shortcuts="{ toggleFullscreen: null }"` throws JSON.parse error

Open chrisspiegl opened this issue 5 months ago • 0 comments

Current Behavior:

In my vue application when I define a media player with:

<media-player :key-shortcuts="{ toggleFullscreen: null }" />

It throws a JSON.parse error.

Expected Behavior:

Should it interpret the object as it should?

Steps To Reproduce:

<media-player :key-shortcuts="{ toggleFullscreen: null }" />

Environment:

  • Framework: Vue
  • Meta Framework: Nuxt
  • Node: 22.0.0

Workaround:

I am working around this issue by stringifying the object. But that feels fishy.

<media-player 
  :key-shortcuts="JSON.stringify({
    toggleFullscreen: null,
  }) as any"
></media-player>

chrisspiegl avatar Aug 02 '25 21:08 chrisspiegl