Skip to content

Commit

Permalink
Merge branch 'MDL-76340-39' of https://github.com/stevandoMoodle/moodle
Browse files Browse the repository at this point in the history
… into MOODLE_39_STABLE
  • Loading branch information
junpataleta committed Nov 25, 2022
2 parents f89a47e + cfce223 commit 746fa81
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/video-lazy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion media/player/videojs/amd/build/video-lazy.min.js.map

Large diffs are not rendered by default.

61 changes: 29 additions & 32 deletions media/player/videojs/amd/src/video-lazy.js
Expand Up @@ -17824,12 +17824,15 @@
var el = _ClickableComponent.prototype.createEl.call(this, 'li', assign({
className: 'vjs-menu-item',
tabIndex: -1
}, props), attrs); // swap icon with menu item text.
}, props), attrs);

el.replaceChild(createEl('span', {
className: 'vjs-menu-item-text',
textContent: this.localize(this.options_.label)
}), el.querySelector('.vjs-icon-placeholder'));
var iconplaceholder = el.querySelector('.vjs-icon-placeholder');
if (typeof iconplaceholder === 'object' && iconplaceholder !== null) {
el.replaceChild(_ClickableComponent.prototype.createEl.call(this, 'span', {
className: 'vjs-menu-item-text',
textContent: this.localize(this.options_.label)
}), iconplaceholder);
}
return el;
}
/**
Expand Down Expand Up @@ -18894,21 +18897,17 @@
var _proto = SubsCapsMenuItem.prototype;

_proto.createEl = function createEl(type, props, attrs) {
var el = _TextTrackMenuItem.prototype.createEl.call(this, type, props, attrs);
var parentSpan = el.querySelector('.vjs-menu-item-text');
var el = _TextTrackMenuItem.prototype.createEl.call(this, 'li', assign({
className: 'vjs-menu-item',
tabIndex: -1
}, props), attrs);

if (this.options_.track.kind === 'captions') {
parentSpan.appendChild(createEl('span', {
className: 'vjs-icon-placeholder'
}, {
'aria-hidden': true
}));
parentSpan.appendChild(createEl('span', {
className: 'vjs-control-text',
// space added as the text will visually flow with the
// label
textContent: " " + this.localize('Captions')
}));
const menuitem = el.querySelector('.vjs-menu-item-text');
if (this.options_.track.kind === 'captions' && menuitem) {
const icon = document.createElement("span");
icon.className = 'vjs-icon-placeholder';
menuitem.appendChild(icon);
el.appendChild(menuitem);
}
return el;
};
Expand Down Expand Up @@ -19059,20 +19058,18 @@
var _proto = AudioTrackMenuItem.prototype;

_proto.createEl = function createEl(type, props, attrs) {
var el = _MenuItem.prototype.createEl.call(this, type, props, attrs);
var parentSpan = el.querySelector('.vjs-menu-item-text');
var el = _MenuItem.prototype.createEl.call(this, 'li', assign({
className: 'vjs-menu-item',
tabIndex: -1
}, props), attrs);

if (this.options_.track.kind === 'main-desc') {
parentSpan.appendChild(_MenuItem.prototype.createEl.call(this, 'span', {
className: 'vjs-icon-placeholder'
}, {
'aria-hidden': true
}));
parentSpan.appendChild(_MenuItem.prototype.createEl.call(this, 'span', {
className: 'vjs-control-text',
textContent: this.localize('Descriptions')
}));
}
const menuitem = el.querySelector('.vjs-menu-item-text');
if (this.options_.track.kind === 'main' && menuitem) {
const icon = document.createElement("span");
icon.className = 'vjs-icon-placeholder';
menuitem.appendChild(icon);
el.appendChild(menuitem);
}

return el;
}
Expand Down
4 changes: 3 additions & 1 deletion media/player/videojs/readme_moodle.txt
Expand Up @@ -42,4 +42,6 @@ Changes:
In order to improve the validation, a couple of minor changes have been added to the video-lazy.js:
1. Partial upgrade from VideoJS 7.17.0 for 'Subtitles' label check in 17824 - 17833
2. Partial upgrade from VideoJS 7.17.0 for 'Captions' label check from 18897 - 18911
3. Partial upgrade from VideoJS 7.17.0 for 'Description' label check from 19062 - 19075
3. Partial upgrade from VideoJS 7.17.0 for 'Description' label check from 19062 - 19075
4. Fixed the video controls not being displayed when playing a video
5. Fixed the menu item not being displayed as expected

0 comments on commit 746fa81

Please sign in to comment.