From 5d0094fb5305ed01cebd33cbee246433cd58b877 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 6 Dec 2022 17:42:26 -0500 Subject: stop playing media when switching to next slide --- src/client/views/nodes/trails/PresBox.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 3b9a913f7..0a4423311 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -35,6 +35,7 @@ import { FieldView, FieldViewProps } from '../FieldView'; import { ScriptingBox } from '../ScriptingBox'; import './PresBox.scss'; import { PresEffect, PresEffectDirection, PresMovement, PresStatus } from './PresEnums'; +import { CollectionStackedTimeline } from '../../collections/CollectionStackedTimeline'; const { Howl } = require('howler'); export interface PinProps { @@ -234,6 +235,7 @@ export class PresBox extends ViewBoxBaseComponent() { // TODO: to handle child slides (entering into subtrail and exiting), also the next() and back() functions // No more frames in current doc and next slide is defined, therefore move to next slide nextSlide = (slideNum?: number) => { + CollectionStackedTimeline.CurrentlyPlaying?.map((clip, i) => DocumentManager.Instance.getDocumentView(clip)?.ComponentView?.Pause?.()); let nextSelected = slideNum ?? this.itemIndex + 1; this.gotoDocument(nextSelected, this.activeItem); for (nextSelected = nextSelected + 1; nextSelected < this.childDocs.length; nextSelected++) { -- cgit v1.2.3-70-g09d2