Manually merge PR #1629
This commit is contained in:
6
src/js/controls.js
vendored
6
src/js/controls.js
vendored
@ -139,7 +139,7 @@ const controls = {
|
|||||||
// Create hidden text label
|
// Create hidden text label
|
||||||
createLabel(key, attr = {}) {
|
createLabel(key, attr = {}) {
|
||||||
const text = i18n.get(key, this.config);
|
const text = i18n.get(key, this.config);
|
||||||
const attributes = { ...attr, class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' '),};
|
const attributes = { ...attr, class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ') };
|
||||||
|
|
||||||
return createElement('span', attributes, text);
|
return createElement('span', attributes, text);
|
||||||
},
|
},
|
||||||
@ -1378,7 +1378,9 @@ const controls = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Volume range control
|
// Volume range control
|
||||||
if (control === 'volume') {
|
// Ignored on iOS as it's handled globally
|
||||||
|
// https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
|
||||||
|
if (control === 'volume' && !browser.isIos) {
|
||||||
// Set the attributes
|
// Set the attributes
|
||||||
const attributes = {
|
const attributes = {
|
||||||
max: 1,
|
max: 1,
|
||||||
|
@ -41,14 +41,6 @@
|
|||||||
&.plyr__time + .plyr__time {
|
&.plyr__time + .plyr__time {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.plyr__volume {
|
|
||||||
padding-right: ($plyr-control-spacing / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.plyr__volume:first-child {
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide empty controls
|
// Hide empty controls
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
.plyr__volume {
|
.plyr__volume {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
input[type='range'] {
|
input[type='range'] {
|
||||||
margin-left: ($plyr-control-spacing / 2);
|
margin-left: ($plyr-control-spacing / 2);
|
||||||
|
margin-right: ($plyr-control-spacing / 2);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
@ -22,16 +23,3 @@
|
|||||||
max-width: 110px;
|
max-width: 110px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide sound controls on iOS
|
|
||||||
// It's not supported to change volume using JavaScript:
|
|
||||||
// https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
|
|
||||||
.plyr--is-ios .plyr__volume {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vimeo has no toggle mute method so hide mute button
|
|
||||||
// https://github.com/vimeo/player.js/issues/236#issuecomment-384663183
|
|
||||||
.plyr--is-ios.plyr--vimeo [data-plyr='mute'] {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user