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

player.rebuild resetting position of closed captions button #288

Open
joe-allen-89 opened this issue Mar 21, 2024 · 0 comments
Open

player.rebuild resetting position of closed captions button #288

joe-allen-89 opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels

Comments

@joe-allen-89
Copy link
Contributor

joe-allen-89 commented Mar 21, 2024

Subject of the issue

Currently any plugin extending media view and requiring the player to be rebuilt (when clicking between multiple videos) _playerOptions.features is ignored and the closed captions button is moved to the end of the controls.

This is due to the captions button being removed then appended to controls on buildtracks -

player.captionsButton =
$('<div class="mejs-button mejs-captions-button">' +
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.tracksText + '" aria-label="' + t.options.tracksText + '"></button>' +
'<div class="mejs-captions-selector">' +
'<ul>' +
'<li>' +
'<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
'<label for="' + player.id + '_captions_none">' + mejs.i18n.t('None') + '</label>' +
'</li>' +
'</ul>' +
'</div>' +
'</div>')
.appendTo(controls);

Your environment

  • v5.37.1
  • chrome

Expected behaviour

On rebuild the control buttons should be kept in the order specified in _playerOptions

Actual behaviour

Closed caption button moved to the end of the controls

@joe-allen-89 joe-allen-89 self-assigned this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant