make waiting for insertion before playing video apply to all posts
This commit is contained in:
parent
2360185eb4
commit
a9ea92a8bc
@ -26,8 +26,7 @@ ImageExpand =
|
|||||||
ImageExpand.expand @
|
ImageExpand.expand @
|
||||||
else if @file.isExpanded and @file.isVideo
|
else if @file.isExpanded and @file.isVideo
|
||||||
ImageExpand.setupVideoCB @
|
ImageExpand.setupVideoCB @
|
||||||
if !@origin.file.fullImage?.paused or @origin.file.wasPlaying
|
ImageExpand.play @ if !@origin.file.fullImage?.paused or @origin.file.wasPlaying
|
||||||
$.asap (=> doc.contains @nodes.root), => ImageExpand.play @
|
|
||||||
else if ImageExpand.on and !@isHidden and
|
else if ImageExpand.on and !@isHidden and
|
||||||
(Conf['Expand spoilers'] or !@file.isSpoiler) and
|
(Conf['Expand spoilers'] or !@file.isSpoiler) and
|
||||||
(Conf['Expand videos'] or !@file.isVideo)
|
(Conf['Expand videos'] or !@file.isVideo)
|
||||||
@ -207,11 +206,12 @@ ImageExpand =
|
|||||||
ImageCommon.addControls file.fullImage if Conf['Show Controls']
|
ImageCommon.addControls file.fullImage if Conf['Show Controls']
|
||||||
|
|
||||||
play: (post) ->
|
play: (post) ->
|
||||||
c.log 'play', !d.hidden and Header.isNodeVisible post.file.fullImage
|
{fullImage} = post.file
|
||||||
if !d.hidden and Header.isNodeVisible post.file.fullImage
|
$.asap (=> doc.contains fullImage), =>
|
||||||
post.file.fullImage.play()
|
if !d.hidden and Header.isNodeVisible fullImage
|
||||||
else
|
fullImage.play()
|
||||||
post.file.wasPlaying = true
|
else
|
||||||
|
post.file.wasPlaying = true
|
||||||
|
|
||||||
videoControls: $.el 'span',
|
videoControls: $.el 'span',
|
||||||
className: 'video-controls'
|
className: 'video-controls'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user