2

Loving plyr.js - am using the npm package but am just wondering how we configure different players with different settings on the same page. It seems the local storage config object just gets overwritten every time?

I.e. I have some videos acting as backgrounds (they are muted, don't have controls etc...) and some as popout players (have controls, aren't muted etc...) - this works OK on first page load. But when refreshing the page the muted settings get overwritten on the background players :/

    if ($background) {
        $config = "data-plyr-config='{ \"muted\": true, \"autoplay\": true, \"volume\": 0, \"controls\": false }'";
    } else {
        $config = "data-plyr-config='{ \"muted\": false, \"volume\": 1}'";
    }

0 Answers0