cache error handler should handle video errors that can occur during removal
This commit is contained in:
parent
f99a818554
commit
24e5676717
@ -134,16 +134,16 @@ ImageExpand =
|
||||
window.scrollBy 0, d.body.clientHeight - oldHeight
|
||||
|
||||
if el = file.fullImage
|
||||
delete file.fullImage
|
||||
$.off el, 'error', ImageExpand.error
|
||||
ImageCommon.pushCache el
|
||||
if file.isVideo
|
||||
el.pause()
|
||||
for eventName, cb of ImageExpand.videoCB
|
||||
$.off el, eventName, cb
|
||||
ImageCommon.rewind post, el
|
||||
delete file.fullImage
|
||||
$.rm el
|
||||
$.rmClass el, 'full-image'
|
||||
ImageCommon.rewind post, el
|
||||
ImageCommon.pushCache el
|
||||
|
||||
expand: (post, src) ->
|
||||
# Do not expand images of hidden/filtered replies, or already expanded pictures.
|
||||
|
||||
@ -54,13 +54,12 @@ ImageHover =
|
||||
height: scale * height + padding
|
||||
noRemove: true
|
||||
cb: ->
|
||||
if isVideo
|
||||
el.pause()
|
||||
$.rm el
|
||||
$.off el, 'error', error
|
||||
ImageCommon.pushCache el
|
||||
el.pause() if isVideo
|
||||
$.rm el
|
||||
el.removeAttribute 'id'
|
||||
el.removeAttribute 'style'
|
||||
ImageCommon.pushCache el
|
||||
error: (post) -> ->
|
||||
return if ImageCommon.decodeError @, post
|
||||
ImageCommon.error @, post, 3 * $.SECOND, (URL) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user