Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play-large button is missing, when using custom html for controls #1748

Open
JohMun opened this issue Mar 31, 2020 · 1 comment
Open

play-large button is missing, when using custom html for controls #1748

JohMun opened this issue Mar 31, 2020 · 1 comment

Comments

@JohMun
Copy link

JohMun commented Mar 31, 2020

Plyr: 3.5.10
Codepen: https://codepen.io/JohMun/pen/PoqLwjB

If I use a HTML string to create the controls, as explained here i get the following error:

The centered Button "play-large" is missing.

Also some of the stylings are not correct:

image

The range input in "plyr__progress" should contain width: 100%, i think.

@vogdb
Copy link

vogdb commented Apr 19, 2023

You can add play-large to your custom controls as well

const controls = `
<div class="plyr__controls">
   // ... your custom controls
</div>
// our big center button
<button type="button" class="plyr__control plyr__control--overlaid" data-plyr="play" aria-pressed="false" aria-label="Play, View From A Blue Moon - Official Trailer (4K Ultra HD) - John Florence"><svg aria-hidden="true" focusable="false"><use xlink:href="#plyr-play"></use></svg><span class="plyr__sr-only">Play</span></button>
`;
const player = new Plyr('#player', {
    controls: controls,
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants