fix video controls
This commit is contained in:
parent
52949b545e
commit
49d76b4177
@ -7705,15 +7705,15 @@
|
|||||||
TrashQueue.remove(el);
|
TrashQueue.remove(el);
|
||||||
} else {
|
} else {
|
||||||
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
||||||
className: 'full-image',
|
className: 'full-image'
|
||||||
src: src || post.file.URL
|
|
||||||
});
|
});
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
el.loop = true;
|
el.loop = true;
|
||||||
}
|
}
|
||||||
$.on(el, 'error', ImageExpand.error);
|
$.on(el, 'error', ImageExpand.error);
|
||||||
|
el.src = src || post.file.URL;
|
||||||
}
|
}
|
||||||
if (el.isVideo) {
|
if (isVideo) {
|
||||||
el.controls = Conf['Show Controls'];
|
el.controls = Conf['Show Controls'];
|
||||||
}
|
}
|
||||||
position = el.controls ? thumb.parentNode : thumb;
|
position = el.controls ? thumb.parentNode : thumb;
|
||||||
|
|||||||
@ -7724,15 +7724,15 @@
|
|||||||
TrashQueue.remove(el);
|
TrashQueue.remove(el);
|
||||||
} else {
|
} else {
|
||||||
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
||||||
className: 'full-image',
|
className: 'full-image'
|
||||||
src: src || post.file.URL
|
|
||||||
});
|
});
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
el.loop = true;
|
el.loop = true;
|
||||||
}
|
}
|
||||||
$.on(el, 'error', ImageExpand.error);
|
$.on(el, 'error', ImageExpand.error);
|
||||||
|
el.src = src || post.file.URL;
|
||||||
}
|
}
|
||||||
if (el.isVideo) {
|
if (isVideo) {
|
||||||
el.controls = Conf['Show Controls'];
|
el.controls = Conf['Show Controls'];
|
||||||
}
|
}
|
||||||
position = el.controls ? thumb.parentNode : thumb;
|
position = el.controls ? thumb.parentNode : thumb;
|
||||||
|
|||||||
@ -112,10 +112,10 @@ ImageExpand =
|
|||||||
else
|
else
|
||||||
el = post.file.fullImage = $.el (if isVideo then 'video' else 'img'),
|
el = post.file.fullImage = $.el (if isVideo then 'video' else 'img'),
|
||||||
className: 'full-image'
|
className: 'full-image'
|
||||||
src: src or post.file.URL
|
|
||||||
el.loop = true if isVideo
|
el.loop = true if isVideo
|
||||||
$.on el, 'error', ImageExpand.error
|
$.on el, 'error', ImageExpand.error
|
||||||
el.controls = Conf['Show Controls'] if el.isVideo
|
el.src = src or post.file.URL
|
||||||
|
el.controls = Conf['Show Controls'] if isVideo
|
||||||
position = if el.controls then thumb.parentNode else thumb
|
position = if el.controls then thumb.parentNode else thumb
|
||||||
$.after position, el unless el is position.nextSibling
|
$.after position, el unless el is position.nextSibling
|
||||||
$.asap (-> isVideo or el.naturalHeight), ->
|
$.asap (-> isVideo or el.naturalHeight), ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user