Mini-media-player: Error after install

Created on 20 Sep 2018  路  5Comments  路  Source: kalkih/mini-media-player

Hi!

I have installed this card and I cannot get it to work. The card displays the following error:

i.setConfig is not a function. (In 'i.setConfig(e)', 'i.setConfig' is undefined

The log is now throwing this error:

https://xxxxxxxxx.duckdns.org:8123/local/mini-media-player.js:5:40 TypeError: this.createShadowRoot is not a function. (In 'this.createShadowRoot()', 'this.createShadowRoot' is undefined)
bug

Most helpful comment

That solved it! Thanks for quick response and good feedback!

All 5 comments

Hey,
This is most likely a browser compatibility issue and I think this should be solved with the latest release v0.5.
Please try updating, and make sure to change the version number in your ui-lovelace.yaml

resources:
  - url: /local/mini-media-player.js?ver=0.5

New error in log:

https://xxxxxxxxx.duckdns.org:8123/local/mini-media-player/mini-media-player.js?ver=0.5:2:0 SyntaxError: Unexpected token '{'. import call expects exactly one argument.

What browser are you using?

Make sure you have javascript_version: latest set in your configuration.yaml under frontend:.

I think I've figured out the issue now!
The resource type in your ui-lovelace.yaml should be set to module and not js, like below.

resources:
  - url: /local/mini-media-player.js?ver=0.5
    type: module

I hope this will resolve your issue.

That solved it! Thanks for quick response and good feedback!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

orickcorreia picture orickcorreia  路  5Comments

nibblerrick picture nibblerrick  路  5Comments

TheRealBadRobot picture TheRealBadRobot  路  3Comments

Tom-ahawk picture Tom-ahawk  路  5Comments

darkkatarsis picture darkkatarsis  路  4Comments