UNPKG

dm-unimmersive

Version:
34 lines (33 loc) 1.44 kB
import { Branch, Segment, BranchItemRole } from '../types'; declare class BranchManager { current_branch: Branch; current_segment: Segment; previous_branches: Branch[]; scenario: Segment[]; mode: 'silent' | 'prod'; constructor(scenario: Segment[], mode?: 'silent' | 'prod'); init({ current_segment, }: { current_segment: Segment; }): void; getNextSeekableSegment(seconds: number): Segment; getPreviousSeekableSegment(seconds: number): Segment; getNextSegment(): null | Segment; goToNextSegment(): Segment; goToPrevSegment(): Segment; getDurationOfTimeline(): number; getDurationOfPreviousBranches(): number; getDurationOfPreviousBranchesWithCurrentPosition(): number; update(current_segment: Segment): void; _findBranchItem(branch_id: string | string[], role: BranchItemRole): Segment; _isSegmentTheEndOfTheBranch(segment: Segment): boolean; _isSegmentTheBegginingOfTheBranch(segment: Segment): boolean; _copyObject(obj: object): any; _isSegmentAutonomous(segment: Segment): boolean; getPrevSegment(return_from_splitting_segment?: boolean): Segment; _isSegmentAlreadySeen(segment: Segment): boolean; updateBranches(new_current_segment: Segment): void; testViewOfDuration(): Branch[]; _isSplittingOrNormalSegment(segment: Segment): boolean; showState(): void; } export default BranchManager;