Skip to content

Commit

Permalink
fix(player): Expanded conditional to allow rendering settings speed b…
Browse files Browse the repository at this point in the history
…y default
  • Loading branch information
rafa8626 committed May 31, 2019
1 parent c4c591e commit fe5a271
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/openplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4488,7 +4488,9 @@ var Controls = function () {
});
Object.keys(this.items).forEach(function (position) {
_this5.items[position].forEach(function (item) {
if (!_this5.player.getOptions().detachMenus && !item.custom && typeof item.addSettings === 'function') {
var allowDefault = !_this5.player.getOptions().detachMenus || item instanceof settings_1.default;

if (allowDefault && !item.custom && typeof item.addSettings === 'function') {
var menuItem = item.addSettings();

if (Object.keys(menuItem).length) {
Expand Down
2 changes: 1 addition & 1 deletion dist/openplayer.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/js/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ class Controls implements PlayerComponent {

Object.keys(this.items).forEach((position: string) => {
this.items[position].forEach((item: any) => {
if (!this.player.getOptions().detachMenus && !item.custom && typeof item.addSettings === 'function') {
const allowDefault = !this.player.getOptions().detachMenus || item instanceof Settings;
if (allowDefault && !item.custom && typeof item.addSettings === 'function') {
const menuItem = item.addSettings();
if (Object.keys(menuItem).length) {
this.settings.addItem(
Expand Down

0 comments on commit fe5a271

Please sign in to comment.