fix video background pause for collapsed group

This commit is contained in:
zombieFox 2021-09-24 12:22:57 +01:00
parent 080346f639
commit 812669cdcf
2 changed files with 8 additions and 4 deletions

View File

@ -21,6 +21,8 @@ const BookmarkTile = function({
preview = false
} = {}) {
this.data = bookmarkData;
this.element = {
bookmark: node('div|class:bookmark'),
front: node('div|class:bookmark-front'),

View File

@ -21,6 +21,8 @@ export const GroupArea = function({
groupData = {}
} = {}) {
this.data = groupData;
this.element = {
group: node('div|class:group'),
header: node('div|class:group-header'),
@ -233,9 +235,9 @@ export const GroupArea = function({
},
video: () => {
if (bookmark.tile.current.length > 0) {
bookmark.tile.current.forEach((item, i) => {
bookmark.tile.current.forEach((item, i) => {
if (item.data.position.origin.group === groupData.position.origin) {
if (item.video) {
if (groupData.group.collapse) {
item.video.pause();
@ -243,9 +245,9 @@ export const GroupArea = function({
item.video.play();
};
};
};
});
};
});
}
};