Source: timeShift.js

/**
 * STB object declaration and documentation.
 * JSDoc specification ({@link http://usejsdoc.org/}).
 * An introduction to JSDoc ({@link http://www.2ality.com/2011/08/jsdoc-intro.html}).
 *
 * @fileOverview Provides API to the TimeShift subsystem.
 */

'use strict';

/* jshint unused:false */

//noinspection JSUnusedGlobalSymbols

/**
 * Main TimeShift object.
 *
 * Operation on TimeShift states such as {@link timeShift.EnterTimeShift}, {@link timeShift.ExitTimeShift}, etc.
 * takes effect only if playback was started with solution "`extTimeShift`".
 *
 * @namespace
 */
var timeShift = {

	/**
	 * Set path to folder where TimeShift files will be located.
	 *
	 * @param {string} folderPath path to timeShift working folder
	 */
	SetTimeShiftFolder:
		function ( folderPath ) {},


	/**
	 * Set maximum size of TimeShift window in seconds.
	 *
	 * @param {number} duration window duration in seconds
	 */
	SetMaxDuration:
		function ( duration ) {},


	/**
	 * Enter TimeShift mode.
	 *
	 * In this mode trick mode commands like pause, resume, seek is allowed.
	 */
	EnterTimeShift:
		function () {},


	/**
	 * Exit from TimeShift mode and return to real-time mode.
	 *
	 * All temporary files will be removed.
	 */
	ExitTimeShift:
		function () {},


	/**
	 * Exit from TimeShift mode and save current TimeShift buffer via PVR.
	 *
	 * @param {string} path path to location where recording will be saved
	 * @param {string} name name of the recording
	 */
	ExitTimeShiftAndSave:
		function ( path, name ) {},


	/**
	 * Exit from TimeShift, stop playback and save TimeShift buffer via PVR with possibility to continue recording.
	 *
	 * @param {string} path path to location where recording will be saved
	 * @param {string} name name of the recording
	 * @param {number} duration in second for how log PVR should continue to save stream into specified recording task
	 */
	ExitTimeShiftAndSaveDuration:
		function ( path, name, duration ) {},


	/**
	 * Set sliding TimeShift mode which defines what happens after reaching the left boundary of TimeShift buffer in paused mode.
	 *
	 * By default sliding mode is disabled on start of each playback.
	 *
	 * @param {boolean} onOff possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | Slide TimeShift buffer after overflow in paused mode. <br> `Event 36 (0x24)` will appear with code 3 in arguments. After that buffer continues writing to right boundary and drop all data from left boundary in paused mode.
	 *  false | Do not slide after buffer overflow in pause mode. <br> `Event 36 (0x24)` will appear with code 4 in arguments. From this point we can play or seek inside current TimeShift buffer but right boundary will never grow until we switch into real-time mode.
	 */
	SetSlidingMode:
		function ( onOff ) {}

};