UNPKG

dm-unimmersive

Version:
68 lines (67 loc) 2.45 kB
import { Mode, Segment } from "../types"; export declare const SPLITTING_FILES: any[]; declare class SplittingFilesManager { played_fragments: any[]; constructor({ played_fragments }: { played_fragments: Segment[]; }); /** * Get already watched fragments * @returns {Array.<string>} already watched fragments */ getAlreadyPlayedFragments(): any[]; clearLocalStorage(): void; _isSplittingFIle(fragment_name: any): boolean; /** * Add fragment_name to the localStorage * @param {string} fragment_name */ addPlayedFragment(fragment_name: any): void; /** * Choose what splitting file should user see based on * previous watched fragments * @param {string} chosen_mode that you r going to turn on * @returns {string} the name of splitting file */ chooseFragment({ chosen_mode, previous }: { previous?: Segment[]; chosen_mode: Mode; }): any; /** * Select one of the two fragments each after other in turn * @param {Array.<string>} watched already watched fragments * @param {Array.<string>} fragments you need to show * @returns {string} the fragment that should be played */ oneOfTwoInTurn(watched: any, fragments: any): any; /** * @param {string} fragment * @returns string without prefix */ _replacePrefix(fragment: any): any; /** * Choose what player to turn on to show splitting file * based on mode you transition to and previous watched * segments * @param {string} chosen_mode immersive or normal * @param {Array.<object>} players array of all players * @returns {number} index of target player */ choosePlayer({ chosen_mode, players }: { chosen_mode: any; players: any; }): any; /** * What video should play provided player next * @param {object} transitionPlayer what player should update it's sourse * to load next splitting file * @param {Array.<object>} transitionSegments all segments that are currently * exist in the state * @returns {object} the source with the segment that should be played next */ chooseSegmentForUpdate({ transitionPlayer, transitionSegments }: { transitionPlayer: any; transitionSegments: any; }): any; } export default SplittingFilesManager;