aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-09-08 18:22:47 -0400
committerbobzel <zzzman@gmail.com>2022-09-08 18:22:47 -0400
commit77cc4a22480d3d5773f70f661052404fed016219 (patch)
tree720682fc1501b561095dbd2b02d9908928b93cd0 /src/client/views/LightboxView.tsx
parentccf9c8099bc2b4685071efe117f4a4a40d1eb5e6 (diff)
stop playing videos when lightbox doc changes.
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 99d50b4a2..d5f5dabb6 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -12,6 +12,7 @@ import { LinkManager } from '../util/LinkManager';
import { SelectionManager } from '../util/SelectionManager';
import { Transform } from '../util/Transform';
import { CollectionDockingView } from './collections/CollectionDockingView';
+import { CollectionStackedTimeline } from './collections/CollectionStackedTimeline';
import { TabDocView } from './collections/TabDocView';
import './LightboxView.scss';
import { DocumentView } from './nodes/DocumentView';
@@ -56,6 +57,11 @@ export class LightboxView extends React.Component<LightboxViewProps> {
const l = DocUtils.MakeLinkToActiveAudio(() => doc).lastElement();
l && (Cast(l.anchor2, Doc, null).backgroundColor = 'lightgreen');
}
+ CollectionStackedTimeline.CurrentlyPlaying.forEach(doc => {
+ DocumentManager.Instance.getAllDocumentViews(doc).forEach(dv => {
+ dv.ComponentView?.Pause?.();
+ });
+ });
//TabDocView.PinDoc(doc, { hidePresBox: true });
this._history ? this._history.push({ doc, target }) : (this._history = [{ doc, target }]);
if (doc !== LightboxView.LightboxDoc) {