kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.48k stars 206 forks source link

Not loading with cold start (no caching) #426

Open Mincka opened 3 years ago

Mincka commented 3 years ago

Hello,

When a view is loading with the mini-media-player with a clear cache, the component does not load. It happens every time when using CTRL+F5 on Edge and Chrome. Same thing with Android mobile app if not started. It happens about 1 in 5 times with Firefox. I don't have this behavior with other components like slider-entity-row.js.

To make the mini-media-player load, I need to switch between views or switch to Edit Dashboard mode. The "Reload ressources" button in HA also does not help if the component is not appearing.

One can argue it's not much an issue since it only happens on the first loading without cache. However, in my case, I want to load a default view with the mini-media-player on mobile (Android). Each time the application is killed, it loads the view without caching and consequently, the mini-media-player is never loading at app startup. 😢 The Android app full reload issue is also tracked here.

HA: 0.116.4 Mini Media Player: v1.11.0, installed via HACS

configuration.yaml

lovelace:
  mode: yaml
  resources:
    - url: /hacsfiles/atomic-calendar-revive/atomic-calendar-revive.js
      type: module
    - url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
      type: module      
    - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
      type: module    

I tried to reverse the order. It has no effect.

Fail with multiple types of configurations (even basic ones with only the entity), with one or more in the same view. Same results with standard or YAML dashboards. Same results if the mini-media-player is the first or second component of the view. No error in the Console and the js is properly loading in the Network tab.

nagyrobi commented 3 years ago

I feel that this has to do something with the multiroom checkboxes inconsistent display. Once in a while I see the checkboxes appearing as they should. A reload (F5 or Ctrl+F5 etc) will make them disappear.

nagyrobi commented 3 years ago

The "Reload ressources" button in HA

Where is that button?