mirror of https://github.com/OpenVidu/openvidu.git
openvidu-node-client: update dependencies. Update TypeDoc
parent
c1a8940270
commit
13a0616619
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"include": ["../src"],
|
||||
"exclude": ["../config", "../docs", "../lib", "../node_modules"],
|
||||
"typedocOptions": {
|
||||
"name": "OpenVidu Node Client",
|
||||
"entryPoints": ["../src/index.ts"],
|
||||
"out": "../docs",
|
||||
"theme": "default",
|
||||
"readme": "none",
|
||||
"includeVersion": true,
|
||||
"validation": {
|
||||
"notExported": true,
|
||||
"invalidLink": true
|
||||
},
|
||||
"excludeExternals": true,
|
||||
"excludePrivate": true,
|
||||
"excludeProtected": true,
|
||||
"excludeInternal": true
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ fi
|
|||
grep -rl '/en/stable/' src | xargs sed -i -e 's|/en/stable/|/en/'${BASEHREF_VERSION}'/|g'
|
||||
|
||||
# Generate TypeDoc
|
||||
./node_modules/typedoc/bin/typedoc --options ./config/typedoc.js ./src
|
||||
./node_modules/typedoc/bin/typedoc --tsconfig ./config/tsconfig.json
|
||||
|
||||
# Return links to "stable" version
|
||||
grep -rl '/en/'${BASEHREF_VERSION}'/' src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,20 +6,20 @@
|
|||
},
|
||||
"description": "OpenVidu Node Client",
|
||||
"devDependencies": {
|
||||
"@types/node": "14.14.37",
|
||||
"grunt": "1.3.0",
|
||||
"grunt-cli": "1.4.2",
|
||||
"@types/node": "18.11.9",
|
||||
"grunt": "1.5.3",
|
||||
"grunt-cli": "1.4.3",
|
||||
"grunt-contrib-copy": "1.0.0",
|
||||
"grunt-contrib-sass": "2.0.0",
|
||||
"grunt-contrib-uglify": "5.0.1",
|
||||
"grunt-contrib-uglify": "5.2.2",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-postcss": "0.9.0",
|
||||
"grunt-string-replace": "1.3.1",
|
||||
"grunt-string-replace": "1.3.3",
|
||||
"grunt-ts": "6.0.0-beta.22",
|
||||
"ts-node": "9.1.1",
|
||||
"ts-node": "10.9.1",
|
||||
"tslint": "6.1.3",
|
||||
"typedoc": "0.19.2",
|
||||
"typescript": "3.8.3"
|
||||
"typedoc": "0.23.21",
|
||||
"typescript": "4.9.3"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/index.js",
|
||||
|
|
|
@ -21,13 +21,13 @@ import { OpenViduRole } from './OpenViduRole';
|
|||
import { IceServerProperties } from './IceServerProperties';
|
||||
|
||||
/**
|
||||
* See [[Session.connections]]
|
||||
* See {@link Session.connections}
|
||||
*/
|
||||
export class Connection {
|
||||
|
||||
/**
|
||||
* Identifier of the Connection. You can call methods [[Session.forceDisconnect]]
|
||||
* or [[Session.updateConnection]] passing this property as parameter
|
||||
* Identifier of the Connection. You can call methods {@link Session.forceDisconnect}
|
||||
* or {@link Session.updateConnection} passing this property as parameter
|
||||
*/
|
||||
connectionId: string;
|
||||
|
||||
|
@ -77,7 +77,7 @@ export class Connection {
|
|||
clientData: string;
|
||||
|
||||
/**
|
||||
* The [[ConnectionProperties]] assigned to the Connection
|
||||
* The {@link ConnectionProperties} assigned to the Connection
|
||||
*/
|
||||
connectionProperties: ConnectionProperties;
|
||||
|
||||
|
@ -89,13 +89,13 @@ export class Connection {
|
|||
|
||||
/**
|
||||
* Array of Publisher objects this particular Connection is publishing to the Session (each Publisher object has one Stream, uniquely
|
||||
* identified by its `streamId`). You can call [[Session.forceUnpublish]] passing any of this values as parameter
|
||||
* identified by its `streamId`). You can call {@link Session.forceUnpublish} passing any of this values as parameter
|
||||
*/
|
||||
publishers: Publisher[] = [];
|
||||
|
||||
/**
|
||||
* Array of streams (their `streamId` properties) this particular Connection is subscribed to. Each one always corresponds to one
|
||||
* Publisher of some other Connection: each string of this array must be equal to one [[Publisher.streamId]] of other Connection
|
||||
* Publisher of some other Connection: each string of this array must be equal to one {@link Publisher.streamId} of other Connection
|
||||
*/
|
||||
subscribers: string[] = [];
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ import { OpenViduRole } from './OpenViduRole';
|
|||
export interface ConnectionProperties {
|
||||
|
||||
/**
|
||||
* Type of Connection. The [[ConnectionType]] dictates what properties will have effect:
|
||||
* Type of Connection. The {@link ConnectionType} dictates what properties will have effect:
|
||||
*
|
||||
* - **[[ConnectionType.WEBRTC]]**: [[data]], [[record]], [[role]], [[kurentoOptions]]
|
||||
* - **[[ConnectionType.IPCAM]]**: [[data]], [[record]], [[rtspUri]], [[adaptativeBitrate]], [[onlyPlayWithSubscribers]], [[networkCache]]
|
||||
* - **{@link ConnectionType.WEBRTC}**: {@link data}, {@link record}, {@link role}, {@link kurentoOptions}
|
||||
* - **{@link ConnectionType.IPCAM}**: {@link data}, {@link record}, {@link rtspUri}, {@link adaptativeBitrate}, {@link onlyPlayWithSubscribers}, {@link networkCache}
|
||||
*
|
||||
* @default WEBRTC
|
||||
*/
|
||||
|
@ -33,9 +33,9 @@ export interface ConnectionProperties {
|
|||
|
||||
/**
|
||||
* Secure (server-side) data associated to this Connection. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object.
|
||||
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this [[ConnectionProperties.data]] property.
|
||||
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this {@link ConnectionProperties.data} property.
|
||||
* - If you have provided some data when calling `Session.connect(TOKEN, DATA)` (`DATA` defined), then `Connection.data` will have the following structure: `"CLIENT_DATA%/%SERVER_DATA"`, being `CLIENT_DATA` the second
|
||||
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this [[ConnectionProperties.data]] property.
|
||||
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this {@link ConnectionProperties.data} property.
|
||||
*/
|
||||
data?: string;
|
||||
|
||||
|
@ -55,7 +55,7 @@ export interface ConnectionProperties {
|
|||
/**
|
||||
* The role assigned to this Connection
|
||||
*
|
||||
* **Only for [[ConnectionType.WEBRTC]]**
|
||||
* **Only for {@link ConnectionType.WEBRTC}**
|
||||
*
|
||||
* @default PUBLISHER
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ export interface ConnectionProperties {
|
|||
* (parameter `OPENVIDU_STREAMS_VIDEO_MIN_SEND_BANDWIDTH`) for every outgoing stream of the Connection.
|
||||
* - `allowedFilters`: names of the filters the Connection will be able to apply. See [Voice and video filters](/en/stable/advanced-features/filters/)
|
||||
*
|
||||
* **Only for [[ConnectionType.WEBRTC]]**
|
||||
* **Only for {@link ConnectionType.WEBRTC}**
|
||||
*/
|
||||
kurentoOptions?: {
|
||||
videoMaxRecvBandwidth?: number,
|
||||
|
@ -95,7 +95,7 @@ export interface ConnectionProperties {
|
|||
/**
|
||||
* RTSP URI of an IP camera. For example: `rtsp://your.camera.ip:7777/path`
|
||||
*
|
||||
* **Only for [[ConnectionType.IPCAM]]**
|
||||
* **Only for {@link ConnectionType.IPCAM}**
|
||||
*/
|
||||
rtspUri?: string;
|
||||
|
||||
|
@ -104,7 +104,7 @@ export interface ConnectionProperties {
|
|||
* that do not require media transcoding this can be disabled to save CPU power. If you are not sure if transcoding
|
||||
* might be necessary, setting this property to false **may result in media connections not being established**.
|
||||
*
|
||||
* **Only for [[ConnectionType.IPCAM]]**
|
||||
* **Only for {@link ConnectionType.IPCAM}**
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
|
@ -115,7 +115,7 @@ export interface ConnectionProperties {
|
|||
* power consumption and network bandwidth in your server while nobody is asking to receive the camera's video.
|
||||
* On the counterpart, first user subscribing to the IP camera stream will take a little longer to receive its video.
|
||||
*
|
||||
* **Only for [[ConnectionType.IPCAM]]**
|
||||
* **Only for {@link ConnectionType.IPCAM}**
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
|
@ -126,7 +126,7 @@ export interface ConnectionProperties {
|
|||
* delay the signal will have, but more problematic will be in unstable networks. Use short buffers only if there is
|
||||
* a quality connection between the IP camera and OpenVidu Server.
|
||||
*
|
||||
* **Only for [[ConnectionType.IPCAM]]**
|
||||
* **Only for {@link ConnectionType.IPCAM}**
|
||||
*
|
||||
* @default 2000
|
||||
*/
|
||||
|
@ -145,7 +145,7 @@ export interface ConnectionProperties {
|
|||
* The level of precedence for ICE Server configuration on every OpenVidu connection is:
|
||||
*
|
||||
* 1. Configured ICE Server using Openvidu.setAdvancedCofiguration() at openvidu-browser.
|
||||
* 2. Configured ICE server at [[ConnectionProperties.customIceServers]].
|
||||
* 2. Configured ICE server at {@link ConnectionProperties.customIceServers}.
|
||||
* 3. Configured ICE Server at global configuration parameter: `OPENVIDU_WEBRTC_ICE_SERVERS`.
|
||||
* 4. Default deployed Coturn within OpenVidu deployment.
|
||||
*
|
||||
|
@ -154,7 +154,7 @@ export interface ConnectionProperties {
|
|||
*
|
||||
* This method is equivalent to level 2 of precedence.
|
||||
*
|
||||
* **Only for [[ConnectionType.WEBRTC]]**
|
||||
* **Only for {@link ConnectionType.WEBRTC}**
|
||||
*
|
||||
*/
|
||||
customIceServers?: IceServerProperties[];
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* See [[Session.createConnection]]
|
||||
* See {@link Session.createConnection}
|
||||
*/
|
||||
export enum ConnectionType {
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* See [[SessionProperties.mediaMode]]
|
||||
* See {@link SessionProperties.mediaMode}
|
||||
*/
|
||||
export enum MediaMode {
|
||||
|
||||
|
|
|
@ -70,19 +70,19 @@ export class OpenVidu {
|
|||
|
||||
|
||||
/**
|
||||
* Array of active sessions. **This value will remain unchanged since the last time method [[OpenVidu.fetch]]
|
||||
* Array of active sessions. **This value will remain unchanged since the last time method {@link OpenVidu.fetch}
|
||||
* was called**. Exceptions to this rule are:
|
||||
*
|
||||
* - Calling [[OpenVidu.createSession]] automatically adds the new Session object to the local collection.
|
||||
* - Calling [[Session.fetch]] updates that specific Session status
|
||||
* - Calling [[Session.close]] automatically removes the Session from the list of active Sessions
|
||||
* - Calling [[Session.forceDisconnect]] automatically updates the inner affected connections for that specific Session
|
||||
* - Calling [[Session.forceUnpublish]] also automatically updates the inner affected connections for that specific Session
|
||||
* - Calling [[Session.updateConnection]] automatically updates the inner affected connection for that specific Session
|
||||
* - Calling [[OpenVidu.startRecording]] and [[OpenVidu.stopRecording]] automatically updates the recording status of the Session ([[Session.recording]])
|
||||
* - Calling {@link OpenVidu.createSession} automatically adds the new Session object to the local collection.
|
||||
* - Calling {@link Session.fetch} updates that specific Session status
|
||||
* - Calling {@link Session.close} automatically removes the Session from the list of active Sessions
|
||||
* - Calling {@link Session.forceDisconnect} automatically updates the inner affected connections for that specific Session
|
||||
* - Calling {@link Session.forceUnpublish} also automatically updates the inner affected connections for that specific Session
|
||||
* - Calling {@link Session.updateConnection} automatically updates the inner affected connection for that specific Session
|
||||
* - Calling {@link OpenVidu.startRecording} and {@link OpenVidu.stopRecording} automatically updates the recording status of the Session ({@link Session.recording})
|
||||
*
|
||||
* To get the array of active sessions with their current actual value, you must call [[OpenVidu.fetch]] before consulting
|
||||
* property [[activeSessions]]
|
||||
* To get the array of active sessions with their current actual value, you must call {@link OpenVidu.fetch} before consulting
|
||||
* property {@link activeSessions}
|
||||
*/
|
||||
activeSessions: Session[] = [];
|
||||
|
||||
|
@ -98,15 +98,15 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates an OpenVidu session. The session identifier will be available at property [[Session.sessionId]]
|
||||
* Creates an OpenVidu session. The session identifier will be available at property {@link Session.sessionId}
|
||||
*
|
||||
* @returns A Promise that is resolved to the [[Session]] if success and rejected with an
|
||||
* @returns A Promise that is resolved to the {@link Session} if success and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not.
|
||||
* This Error object has as `message` property with a status code carrying a specific meaning
|
||||
* (see [REST API](/en/stable/reference-docs/REST-API/#post-recording-start)).
|
||||
*
|
||||
* This method will never return an Error with status `409`. If a session with the same `customSessionId` already
|
||||
* exists in OpenVidu Server, a [[Session.fetch]] operation is performed in the background and the updated Session
|
||||
* exists in OpenVidu Server, a {@link Session.fetch} operation is performed in the background and the updated Session
|
||||
* object is returned.
|
||||
*/
|
||||
public createSession(properties?: SessionProperties): Promise<Session> {
|
||||
|
@ -128,13 +128,13 @@ export class OpenVidu {
|
|||
public startRecording(sessionId: string, properties: RecordingProperties): Promise<Recording>;
|
||||
|
||||
/**
|
||||
* Starts the recording of a [[Session]]
|
||||
* Starts the recording of a {@link Session}
|
||||
*
|
||||
* @param sessionId The `sessionId` of the [[Session]] you want to start recording
|
||||
* @param sessionId The `sessionId` of the {@link Session} you want to start recording
|
||||
* @param name The name you want to give to the video file. You can access this same value in your clients on recording events (`recordingStarted`, `recordingStopped`)
|
||||
* @param properties Custom RecordingProperties to apply to this Recording. This will override the global default values set to the Session with [[SessionProperties.defaultRecordingProperties]]
|
||||
* @param properties Custom RecordingProperties to apply to this Recording. This will override the global default values set to the Session with {@link SessionProperties.defaultRecordingProperties}
|
||||
*
|
||||
* @returns A Promise that is resolved to the [[Recording]] if it successfully started (the recording can be stopped with guarantees) and rejected with an
|
||||
* @returns A Promise that is resolved to the {@link Recording} if it successfully started (the recording can be stopped with guarantees) and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not.
|
||||
* This Error object has as `message` property with a status code carrying a specific meaning
|
||||
* (see [REST API](/en/stable/reference-docs/REST-API/#post-recording-start)).
|
||||
|
@ -207,11 +207,11 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
/**
|
||||
* Stops the recording of a [[Session]]
|
||||
* Stops the recording of a {@link Session}
|
||||
*
|
||||
* @param recordingId The `id` property of the [[Recording]] you want to stop
|
||||
* @param recordingId The `id` property of the {@link Recording} you want to stop
|
||||
*
|
||||
* @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an
|
||||
* @returns A Promise that is resolved to the {@link Recording} if it successfully stopped and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not.
|
||||
* This Error object has as `message` property with a status code carrying a specific meaning
|
||||
* (see [REST API](/en/stable/reference-docs/REST-API/#post-recording-stop)).
|
||||
|
@ -251,11 +251,11 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets an existing [[Recording]]
|
||||
* Gets an existing {@link Recording}
|
||||
*
|
||||
* @param recordingId The `id` property of the [[Recording]] you want to retrieve
|
||||
* @param recordingId The `id` property of the {@link Recording} you want to retrieve
|
||||
*
|
||||
* @returns A Promise that is resolved to the [[Recording]] if it successfully stopped and rejected with an
|
||||
* @returns A Promise that is resolved to the {@link Recording} if it successfully stopped and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not.
|
||||
* This Error object has as `message` property with a status code carrying a specific meaning
|
||||
* (see [REST API](/en/stable/reference-docs/REST-API/#get-recording)).
|
||||
|
@ -324,7 +324,7 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
/**
|
||||
* Deletes a [[Recording]]. The recording must have status `stopped`, `ready` or `failed`
|
||||
* Deletes a {@link Recording}. The recording must have status `stopped`, `ready` or `failed`
|
||||
*
|
||||
* @param recordingId
|
||||
*
|
||||
|
@ -361,7 +361,7 @@ export class OpenVidu {
|
|||
|
||||
/**
|
||||
* Updates every property of every active Session with the current status they have in OpenVidu Server.
|
||||
* After calling this method you can access the updated array of active sessions in [[activeSessions]]
|
||||
* After calling this method you can access the updated array of active sessions in {@link activeSessions}
|
||||
*
|
||||
* @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not.
|
||||
* This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* See [[TokenOptions.role]]
|
||||
* See {@link TokenOptions.role}
|
||||
*/
|
||||
export enum OpenViduRole {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* See [[Connection.publishers]]
|
||||
* See {@link Connection.publishers}
|
||||
*
|
||||
* This is a backend representation of a published media stream (see [OpenVidu Browser Stream class](/en/stable/api/openvidu-browser/classes/Stream.html))
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@ import { RecordingProperties } from './RecordingProperties';
|
|||
import { RecordingLayout } from './RecordingLayout';
|
||||
|
||||
/**
|
||||
* See [[OpenVidu.startRecording]]
|
||||
* See {@link OpenVidu.startRecording}
|
||||
*/
|
||||
export class Recording {
|
||||
|
||||
|
@ -104,7 +104,7 @@ export class Recording {
|
|||
export namespace Recording {
|
||||
|
||||
/**
|
||||
* See [[Recording.status]]
|
||||
* See {@link Recording.status}
|
||||
*/
|
||||
export enum Status {
|
||||
|
||||
|
@ -127,7 +127,7 @@ export namespace Recording {
|
|||
|
||||
/**
|
||||
* The recording has finished being processed and is available for download through
|
||||
* property [[Recording.url]]
|
||||
* property {@link Recording.url}
|
||||
*/
|
||||
ready = 'ready',
|
||||
|
||||
|
@ -139,7 +139,7 @@ export namespace Recording {
|
|||
}
|
||||
|
||||
/**
|
||||
* See [[RecordingProperties.outputMode]]
|
||||
* See {@link RecordingProperties.outputMode}
|
||||
*/
|
||||
export enum OutputMode {
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* See [[RecordingProperties.recordingLayout]]
|
||||
* See {@link RecordingProperties.recordingLayout}
|
||||
*/
|
||||
export enum RecordingLayout {
|
||||
|
||||
|
|
|
@ -16,19 +16,19 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* See [[SessionProperties.recordingMode]]
|
||||
* See {@link SessionProperties.recordingMode}
|
||||
*/
|
||||
export enum RecordingMode {
|
||||
|
||||
/**
|
||||
* The session is recorded automatically as soon as the first client publishes a stream to the session. It is automatically stopped
|
||||
* after last user leaves the session (or until you call [[OpenVidu.stopRecording]]).
|
||||
* after last user leaves the session (or until you call {@link OpenVidu.stopRecording}).
|
||||
*/
|
||||
ALWAYS = 'ALWAYS',
|
||||
|
||||
/**
|
||||
* The session is not recorded automatically. To record the session, you must call [[OpenVidu.startRecording]] method. To stop the recording,
|
||||
* you must call [[OpenVidu.stopRecording]].
|
||||
* The session is not recorded automatically. To record the session, you must call {@link OpenVidu.startRecording} method. To stop the recording,
|
||||
* you must call {@link OpenVidu.stopRecording}.
|
||||
*/
|
||||
MANUAL = 'MANUAL'
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import { Recording } from './Recording';
|
|||
import { RecordingLayout } from './RecordingLayout';
|
||||
|
||||
/**
|
||||
* See [[OpenVidu.startRecording]]
|
||||
* See {@link OpenVidu.startRecording}
|
||||
*/
|
||||
export interface RecordingProperties {
|
||||
|
||||
|
@ -31,14 +31,14 @@ export interface RecordingProperties {
|
|||
name?: string;
|
||||
|
||||
/**
|
||||
* Whether or not to record audio. Cannot be set to false at the same time as [[RecordingProperties.hasVideo]]
|
||||
* Whether or not to record audio. Cannot be set to false at the same time as {@link RecordingProperties.hasVideo}
|
||||
*
|
||||
* Default to true
|
||||
*/
|
||||
hasAudio?: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not to record video. Cannot be set to false at the same time as [[RecordingProperties.hasAudio]]
|
||||
* Whether or not to record video. Cannot be set to false at the same time as {@link RecordingProperties.hasAudio}
|
||||
*
|
||||
* Default to true
|
||||
*/
|
||||
|
@ -47,23 +47,23 @@ export interface RecordingProperties {
|
|||
/**
|
||||
* The mode of recording: COMPOSED for a single archive in a grid layout or INDIVIDUAL for one archive for each stream
|
||||
*
|
||||
* Default to [[Recording.OutputMode.COMPOSED]]
|
||||
* Default to {@link Recording.OutputMode.COMPOSED}
|
||||
*/
|
||||
outputMode?: Recording.OutputMode;
|
||||
|
||||
/**
|
||||
* The layout to be used in the recording.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* Will only have effect if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.COMPOSED} or {@link Recording.OutputMode.COMPOSED_QUICK_START}
|
||||
*
|
||||
* Default to [[RecordingLayout.BEST_FIT]]
|
||||
* Default to {@link RecordingLayout.BEST_FIT}
|
||||
*/
|
||||
recordingLayout?: RecordingLayout;
|
||||
|
||||
/**
|
||||
* Recording video file resolution. Must be a string with format "WIDTHxHEIGHT",
|
||||
* being both WIDTH and HEIGHT the number of pixels between 100 and 1999.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.hasVideo]] is set to true. For [[Recording.OutputMode.INDIVIDUAL]] all individual video files will have the native resolution of the published stream.
|
||||
* Will only have effect if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.COMPOSED} or {@link Recording.OutputMode.COMPOSED_QUICK_START}
|
||||
* and {@link RecordingProperties.hasVideo} is set to true. For {@link Recording.OutputMode.INDIVIDUAL} all individual video files will have the native resolution of the published stream.
|
||||
*
|
||||
* Default to "1280x720"
|
||||
*/
|
||||
|
@ -71,8 +71,8 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* Recording video file frame rate.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.hasVideo]] is set to true. For [[Recording.OutputMode.INDIVIDUAL]] all individual video files will have the native frame rate of the published stream.
|
||||
* Will only have effect if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.COMPOSED} or {@link Recording.OutputMode.COMPOSED_QUICK_START}
|
||||
* and {@link RecordingProperties.hasVideo} is set to true. For {@link Recording.OutputMode.INDIVIDUAL} all individual video files will have the native frame rate of the published stream.
|
||||
*
|
||||
* Default to 25
|
||||
*/
|
||||
|
@ -80,8 +80,8 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* The amount of shared memory reserved for the recording process in bytes.
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.hasVideo]] is set to true. Property ignored for INDIVIDUAL recordings and audio-only recordings.
|
||||
* Will only have effect if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.COMPOSED} or {@link Recording.OutputMode.COMPOSED_QUICK_START}
|
||||
* and {@link RecordingProperties.hasVideo} is set to true. Property ignored for INDIVIDUAL recordings and audio-only recordings.
|
||||
* Minimum 134217728 (128MB).
|
||||
*
|
||||
* Default to 536870912 (512 MB)
|
||||
|
@ -90,15 +90,15 @@ export interface RecordingProperties {
|
|||
|
||||
/**
|
||||
* The relative path to the specific custom layout you want to use.<br>
|
||||
* Will only have effect if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.COMPOSED]] or [[Recording.OutputMode.COMPOSED_QUICK_START]]
|
||||
* and [[RecordingProperties.recordingLayout]] is set to [[RecordingLayout.CUSTOM]]<br>
|
||||
* Will only have effect if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.COMPOSED} or {@link Recording.OutputMode.COMPOSED_QUICK_START}
|
||||
* and {@link RecordingProperties.recordingLayout} is set to {@link RecordingLayout.CUSTOM}<br>
|
||||
* See [Custom recording layouts](/en/stable/advanced-features/recording#custom-recording-layouts) to learn more.
|
||||
*/
|
||||
customLayout?: string;
|
||||
|
||||
/**
|
||||
* Whether to ignore failed streams or not when starting the recording. This property only applies if [[RecordingProperties.outputMode]] is set to [[Recording.OutputMode.INDIVIDUAL]].
|
||||
* For this type of recordings, when calling [[OpenVidu.startRecording]] by default all the streams available at the moment the recording process starts must be healthy
|
||||
* Whether to ignore failed streams or not when starting the recording. This property only applies if {@link RecordingProperties.outputMode} is set to {@link Recording.OutputMode.INDIVIDUAL}.
|
||||
* For this type of recordings, when calling {@link OpenVidu.startRecording} by default all the streams available at the moment the recording process starts must be healthy
|
||||
* and properly sending media. If some stream that should be sending media is broken, then the recording process fails after a 10s timeout. In this way your application is notified
|
||||
* that some stream is not being recorded, so it can retry the process again.
|
||||
*
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import axios from 'axios';
|
||||
import { Connection } from './Connection';
|
||||
import { ConnectionProperties } from './ConnectionProperties';
|
||||
import { MediaMode } from './MediaMode';
|
||||
|
@ -26,8 +26,8 @@ import { RecordingLayout } from './RecordingLayout';
|
|||
import { RecordingMode } from './RecordingMode';
|
||||
import { SessionProperties } from './SessionProperties';
|
||||
import { TokenOptions } from './TokenOptions';
|
||||
import { RecordingProperties } from 'RecordingProperties';
|
||||
import { IceServerProperties } from 'IceServerProperties';
|
||||
import { RecordingProperties } from './RecordingProperties';
|
||||
import { IceServerProperties } from './IceServerProperties';
|
||||
|
||||
export class Session {
|
||||
|
||||
|
@ -48,25 +48,25 @@ export class Session {
|
|||
|
||||
/**
|
||||
* Array of Connections to the Session. This property always initialize as an empty array and
|
||||
* **will remain unchanged since the last time method [[Session.fetch]] or [[OpenVidu.fetch]] was called**.
|
||||
* **will remain unchanged since the last time method {@link Session.fetch} or {@link OpenVidu.fetch} was called**.
|
||||
* Exceptions to this rule are:
|
||||
*
|
||||
* - Calling [[Session.createConnection]] automatically adds the new Connection object to the local collection.
|
||||
* - Calling [[Session.forceUnpublish]] automatically updates each affected local Connection object.
|
||||
* - Calling [[Session.forceDisconnect]] automatically updates each affected local Connection object.
|
||||
* - Calling [[Session.updateConnection]] automatically updates the attributes of the affected local Connection object.
|
||||
* - Calling {@link Session.createConnection} automatically adds the new Connection object to the local collection.
|
||||
* - Calling {@link Session.forceUnpublish} automatically updates each affected local Connection object.
|
||||
* - Calling {@link Session.forceDisconnect} automatically updates each affected local Connection object.
|
||||
* - Calling {@link Session.updateConnection} automatically updates the attributes of the affected local Connection object.
|
||||
*
|
||||
* To get the array of Connections with their current actual value, you must call [[Session.fetch]] or [[OpenVidu.fetch]]
|
||||
* before consulting property [[connections]]
|
||||
* To get the array of Connections with their current actual value, you must call {@link Session.fetch} or {@link OpenVidu.fetch}
|
||||
* before consulting property {@link connections}
|
||||
*/
|
||||
connections: Connection[] = [];
|
||||
|
||||
/**
|
||||
* Array containing the active Connections of the Session. It is a subset of [[Session.connections]] array containing only
|
||||
* those Connections with property [[Connection.status]] to `active`.
|
||||
* Array containing the active Connections of the Session. It is a subset of {@link Session.connections} array containing only
|
||||
* those Connections with property {@link Connection.status} to `active`.
|
||||
*
|
||||
* To get the array of active Connections with their current actual value, you must call [[Session.fetch]] or [[OpenVidu.fetch]]
|
||||
* before consulting property [[activeConnections]]
|
||||
* To get the array of active Connections with their current actual value, you must call {@link Session.fetch} or {@link OpenVidu.fetch}
|
||||
* before consulting property {@link activeConnections}
|
||||
*/
|
||||
activeConnections: Connection[] = [];
|
||||
|
||||
|
@ -96,7 +96,7 @@ export class Session {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use [[Session.createConnection]] instead to get a [[Connection]] object.
|
||||
* @deprecated Use {@link Session.createConnection} instead to get a {@link Connection} object.
|
||||
*
|
||||
* @returns A Promise that is resolved to the generated _token_ string if success and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not
|
||||
|
@ -136,9 +136,9 @@ export class Session {
|
|||
/**
|
||||
* Creates a new Connection object associated to Session object and configured with
|
||||
* `connectionProperties`. Each user connecting to the Session requires a Connection.
|
||||
* The token string value to send to the client side is available at [[Connection.token]].
|
||||
* The token string value to send to the client side is available at {@link Connection.token}.
|
||||
*
|
||||
* @returns A Promise that is resolved to the generated [[Connection]] object if success and rejected with an
|
||||
* @returns A Promise that is resolved to the generated {@link Connection} object if success and rejected with an
|
||||
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not
|
||||
*/
|
||||
public createConnection(connectionProperties?: ConnectionProperties): Promise<Connection> {
|
||||
|
@ -219,10 +219,10 @@ export class Session {
|
|||
|
||||
/**
|
||||
* Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of
|
||||
* Connections of the Session ([[Session.connections]], [[Session.activeConnections]]) and use those values to call [[Session.forceDisconnect]],
|
||||
* [[Session.forceUnpublish]] or [[Session.updateConnection]].
|
||||
* Connections of the Session ({@link Session.connections}, {@link Session.activeConnections}) and use those values to call {@link Session.forceDisconnect},
|
||||
* {@link Session.forceUnpublish} or {@link Session.updateConnection}.
|
||||
*
|
||||
* To update all Session objects owned by OpenVidu object at once, call [[OpenVidu.fetch]]
|
||||
* To update all Session objects owned by OpenVidu object at once, call {@link OpenVidu.fetch}
|
||||
*
|
||||
* @returns A promise resolved to true if the Session status has changed with respect to the server, or to false if not.
|
||||
* This applies to any property or sub-property of the Session object
|
||||
|
@ -267,7 +267,7 @@ export class Session {
|
|||
* In the second case, the token of the Connection will be invalidated and no user will be able to connect to the session with it.
|
||||
*
|
||||
* This method automatically updates the properties of the local affected objects. This means that there is no need to call
|
||||
* [[Session.fetch]] or [[OpenVidu.fetch]]] to see the changes consequence of the execution of this method applied in the local objects.
|
||||
* {@link Session.fetch} or {@link OpenVidu.fetch}] to see the changes consequence of the execution of this method applied in the local objects.
|
||||
*
|
||||
* @param connection The Connection object to remove from the session, or its `connectionId` property
|
||||
*
|
||||
|
@ -333,14 +333,14 @@ export class Session {
|
|||
}
|
||||
|
||||
/**
|
||||
* Forces some Connection to unpublish a Stream (identified by its `streamId` or the corresponding [[Publisher]] object owning it).
|
||||
* Forces some Connection to unpublish a Stream (identified by its `streamId` or the corresponding {@link Publisher} object owning it).
|
||||
* OpenVidu Browser will trigger the proper events on the client-side (`streamDestroyed`) with reason set to `"forceUnpublishByServer"`.
|
||||
*
|
||||
* You can get `publisher` parameter from [[Connection.publishers]] array ([[Publisher.streamId]] for getting each `streamId` property).
|
||||
* Remember to call [[Session.fetch]] or [[OpenVidu.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server
|
||||
* You can get `publisher` parameter from {@link Connection.publishers} array ({@link Publisher.streamId} for getting each `streamId` property).
|
||||
* Remember to call {@link Session.fetch} or {@link OpenVidu.fetch} before to fetch the current actual properties of the Session from OpenVidu Server
|
||||
*
|
||||
* This method automatically updates the properties of the local affected objects. This means that there is no need to call
|
||||
* [[Session.fetch]] or [[OpenVidu.fetch]] to see the changes consequence of the execution of this method applied in the local objects.
|
||||
* {@link Session.fetch} or {@link OpenVidu.fetch} to see the changes consequence of the execution of this method applied in the local objects.
|
||||
*
|
||||
* @param publisher The Publisher object to unpublish, or its `streamId` property
|
||||
*
|
||||
|
@ -398,22 +398,22 @@ export class Session {
|
|||
* <a href="https://docs.openvidu.io/en/2.23.0/openvidu-enterprise/" style="display: inline-block; background-color: rgb(156, 39, 176); color: white; font-weight: bold; padding: 0px 5px; margin: 0 2px 0 2px; border-radius: 3px; font-size: 13px; line-height:21px; text-decoration: none; font-family: Montserrat, sans-serif">ENTERPRISE</a>
|
||||
* editions**
|
||||
*
|
||||
* Updates the properties of a Connection with a [[ConnectionProperties]] object.
|
||||
* Updates the properties of a Connection with a {@link ConnectionProperties} object.
|
||||
* Only these properties can be updated:
|
||||
*
|
||||
* - [[ConnectionProperties.role]]
|
||||
* - [[ConnectionProperties.record]]
|
||||
* - {@link ConnectionProperties.role}
|
||||
* - {@link ConnectionProperties.record}
|
||||
*
|
||||
* This method automatically updates the properties of the local affected objects. This means that there is no need to call
|
||||
* [[Session.fetch]] or [[OpenVidu.fetch]] to see the changes consequence of the execution of this method applied in the local objects.
|
||||
* {@link Session.fetch} or {@link OpenVidu.fetch} to see the changes consequence of the execution of this method applied in the local objects.
|
||||
*
|
||||
* The affected client will trigger one [ConnectionPropertyChangedEvent](/en/stable/api/openvidu-browser/classes/ConnectionPropertyChangedEvent.html)
|
||||
* for each modified property.
|
||||
*
|
||||
* @param connectionId The [[Connection.connectionId]] of the Connection object to modify
|
||||
* @param connectionProperties A new [[ConnectionProperties]] object with the updated values to apply
|
||||
* @param connectionId The {@link Connection.connectionId} of the Connection object to modify
|
||||
* @param connectionProperties A new {@link ConnectionProperties} object with the updated values to apply
|
||||
*
|
||||
* @returns A Promise that is resolved to the updated [[Connection]] object if the operation was
|
||||
* @returns A Promise that is resolved to the updated {@link Connection} object if the operation was
|
||||
* successful and rejected with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object if not
|
||||
*/
|
||||
public updateConnection(connectionId: string, connectionProperties: ConnectionProperties): Promise<Connection | undefined> {
|
||||
|
|
|
@ -21,7 +21,7 @@ import { RecordingMode } from './RecordingMode';
|
|||
import { VideoCodec } from './VideoCodec';
|
||||
|
||||
/**
|
||||
* See [[OpenVidu.createSession]]
|
||||
* See {@link OpenVidu.createSession}
|
||||
*/
|
||||
export interface SessionProperties {
|
||||
|
||||
|
@ -29,22 +29,22 @@ export interface SessionProperties {
|
|||
* How the media streams will be sent and received by your clients: routed through OpenVidu Media Node
|
||||
* (`MediaMode.ROUTED`) or attempting direct p2p connections (`MediaMode.RELAYED`, _not available yet_)
|
||||
*
|
||||
* Default to [[MediaMode.ROUTED]]
|
||||
* Default to {@link MediaMode.ROUTED}
|
||||
*/
|
||||
mediaMode?: MediaMode;
|
||||
|
||||
/**
|
||||
* Whether the Session will be automatically recorded (`RecordingMode.ALWAYS`) or not (`RecordingMode.MANUAL`)
|
||||
*
|
||||
* Default to [[RecordingMode.MANUAL]]
|
||||
* Default to {@link RecordingMode.MANUAL}
|
||||
*/
|
||||
recordingMode?: RecordingMode;
|
||||
|
||||
/**
|
||||
* Default recording properties of this session. You can easily override this value later when starting a
|
||||
* [[Recording]] by providing new [[RecordingProperties]]
|
||||
* {@link Recording} by providing new {@link RecordingProperties}
|
||||
*
|
||||
* Default values defined in [[RecordingProperties]] class
|
||||
* Default values defined in {@link RecordingProperties} class
|
||||
*/
|
||||
defaultRecordingProperties?: RecordingProperties;
|
||||
|
||||
|
@ -77,18 +77,18 @@ export interface SessionProperties {
|
|||
* <code>forcedVideoCodec</code> is set to NONE, no codec will be forced.
|
||||
*
|
||||
* If the browser/client is not compatible with the specified codec, and
|
||||
* [[allowTranscoding]] is <code>false</code>, an exception will occur.
|
||||
* {@link allowTranscoding} is <code>false</code>, an exception will occur.
|
||||
*
|
||||
* If defined here, this parameter has prevalence over
|
||||
* OPENVIDU_STREAMS_FORCED_VIDEO_CODEC.
|
||||
*
|
||||
* Default is [[VideoCodec.MEDIA_SERVER_PREFERRED]].
|
||||
* Default is {@link VideoCodec.MEDIA_SERVER_PREFERRED}.
|
||||
*/
|
||||
forcedVideoCodec?: VideoCodec;
|
||||
|
||||
/**
|
||||
* It defines if you want to allow transcoding in the media server or not
|
||||
* when [[forcedVideoCodec]] is not compatible with the browser/client.
|
||||
* when {@link forcedVideoCodec} is not compatible with the browser/client.
|
||||
*
|
||||
* If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING.
|
||||
* OPENVIDU_STREAMS_ALLOW_TRANSCODING default is 'false'
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
import { OpenViduRole } from './OpenViduRole';
|
||||
|
||||
/**
|
||||
* @deprecated Use [[ConnectionProperties]] instead
|
||||
* @deprecated Use {@link ConnectionProperties} instead
|
||||
*/
|
||||
export interface TokenOptions {
|
||||
|
||||
|
@ -31,9 +31,9 @@ export interface TokenOptions {
|
|||
|
||||
/**
|
||||
* Secure (server-side) data associated to this token. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object.
|
||||
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this [[TokenOptions.data]] property.
|
||||
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this {@link TokenOptions.data} property.
|
||||
* - If you have provided some data when calling `Session.connect(TOKEN, DATA)` (`DATA` defined), then `Connection.data` will have the following structure: `"CLIENT_DATA%/%SERVER_DATA"`, being `CLIENT_DATA` the second
|
||||
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this [[TokenOptions.data]] property.
|
||||
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this {@link TokenOptions.data} property.
|
||||
*/
|
||||
data?: string;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* See [[SessionProperties.forcedVideoCodec]]
|
||||
* See {@link SessionProperties.forcedVideoCodec}
|
||||
*/
|
||||
export enum VideoCodec {
|
||||
MEDIA_SERVER_PREFERRED = 'MEDIA_SERVER_PREFERRED',
|
||||
|
|
Loading…
Reference in New Issue