Rello/audioplayer

[BUG] Dashboard Widget - not playing pls playlists

kenda opened this issue · 2 comments

kenda commented

Describe the bug
I have a couple of pls playlists which are working fine in the app itself. But they are not playing in the dashboard widget.

I found this special handling here:

audioplayer/js/dashboard.js

Lines 355 to 358 in a7984dc

if (itemData['mim'] === 'audio/mpegurl' || itemData['mim'] === 'audio/x-scpls' || itemData['mim'] === 'application/xspf+xml') {
streamUrl = itemData['lin'];
jsondata.data = [];
break;
Which seems to handle the playlists like pls. Not sure if the break might be the problem already.

Expected behavior
After selecting a playlist, I should be able to play it.

Versions:

  • Nextcloud: 25.0.1
  • Audioplayer 3.3.1
kenda commented

I had a little look at it and it seems that the break is basically preventing the following CSP issue that the streams are not allowed because of the media-src CSP. The app itself is adding a wildcard here but I doubt that this is possible for the dashboard page.

Rello commented

thats correct here. the app itself can set alternative CSP - to do this for the dashboard, which includes other apps also, would be fatal