mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 04:28:30 -04:00
This commit is contained in:
parent
72411cef83
commit
28223d026a
@ -1603,6 +1603,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
|
||||
return;
|
||||
}
|
||||
var mediaElement = /audio|video/i.test(mediaSource.tagName) ? mediaSource : mediaSource.parentElement;
|
||||
// If the "controls" property is missing, we need to add it to ensure jQuery-only users can operate the video. See kiwix-js #760.
|
||||
if (/audio|video/i.test(mediaElement.tagName) && !mediaElement.hasAttribute('controls')) mediaElement.setAttribute('controls', '');
|
||||
selectedArchive.getDirEntryByPath(source).then(function(dirEntry) {
|
||||
return selectedArchive.readBinaryFile(dirEntry, function (fileDirEntry, mediaArray) {
|
||||
var mimeType = mediaSource.type ? mediaSource.type : dirEntry.getMimetype();
|
||||
|
Loading…
x
Reference in New Issue
Block a user