diff --git a/openvidu-browser/generate-docs.sh b/openvidu-browser/generate-docs.sh new file mode 100755 index 00000000..3810e947 --- /dev/null +++ b/openvidu-browser/generate-docs.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [[ -z "$BASEHREF_VERSION" ]]; then + echo "Example of use: \"BASEHREF_VERSION=2.12.0 ${0}\"" 1>&2 + exit 1 +fi + +# Replace version from "stable" to the specified one in all TypeDoc links +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 + +# Return links to "stable" version +grep -rl '/en/'${BASEHREF_VERSION}'/' src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g' + +# Clean previous docs from openvidu.io-docs repo and copy new ones +rm -rf ../../openvidu.io-docs/docs/api/openvidu-browser/* +cp -R ./docs/. ../../openvidu.io-docs/docs/api/openvidu-browser \ No newline at end of file diff --git a/openvidu-browser/package.json b/openvidu-browser/package.json index bcee7aeb..795da1aa 100644 --- a/openvidu-browser/package.json +++ b/openvidu-browser/package.json @@ -38,7 +38,7 @@ "browserify": "VERSION=${VERSION:-dev}; cd src && ../node_modules/browserify/bin/cmd.js Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v", "browserify-prod": "VERSION=${VERSION:-dev}; cd src && ../node_modules/browserify/bin/cmd.js --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | ../node_modules/uglify-js/bin/uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js", "build": "cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost", - "docs": "./node_modules/typedoc/bin/typedoc --options ./config/typedoc.js ./src && rm -rf ../../openvidu.io-docs/docs/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io-docs/docs/api/openvidu-browser" + "docs": "./generate-docs.sh" }, "types": "lib/index.d.ts", "version": "2.12.0" diff --git a/openvidu-browser/src/OpenVidu/OpenVidu.ts b/openvidu-browser/src/OpenVidu/OpenVidu.ts index 7235b256..4f3ea46a 100644 --- a/openvidu-browser/src/OpenVidu/OpenVidu.ts +++ b/openvidu-browser/src/OpenVidu/OpenVidu.ts @@ -216,12 +216,12 @@ export class OpenVidu { * The [[Publisher]] object will dispatch an `accessAllowed` or `accessDenied` event once it has been granted access to the requested input devices or not. * * The [[Publisher]] object will dispatch a `videoElementCreated` event once a HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. + * [let OpenVidu take care of the video players](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. * * The [[Publisher]] object will dispatch a `streamPlaying` event once the local streams starts playing. See [[StreamManagerEvent]] to learn more. * * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Publisher will be inserted (see [[PublisherProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Publisher. - * You can always call method [[Publisher.addVideoElement]] or [[Publisher.createVideoElement]] to manage the video elements on your own (see [Manage video players](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos) section) + * You can always call method [[Publisher.addVideoElement]] or [[Publisher.createVideoElement]] to manage the video elements on your own (see [Manage video players](/en/stable/cheatsheet/manage-videos) section) * @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails. * `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event */ diff --git a/openvidu-browser/src/OpenVidu/Session.ts b/openvidu-browser/src/OpenVidu/Session.ts index 3c79bb6b..74ee2bb6 100644 --- a/openvidu-browser/src/OpenVidu/Session.ts +++ b/openvidu-browser/src/OpenVidu/Session.ts @@ -200,20 +200,20 @@ export class Session implements EventDispatcher { * * The [[Session]] object of the local participant will dispatch a `sessionDisconnected` event. * This event will automatically unsubscribe the leaving participant from every Subscriber object of the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). + * and also deletes any HTML video element associated to each Subscriber (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, each Subscriber object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `sessionDisconnected` to avoid this behavior and take care of disposing and cleaning all the Subscriber objects yourself. * See [[SessionDisconnectedEvent]] and [[VideoElementEvent]] to learn more to learn more. * * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event if there is a [[Publisher]] object publishing to the session. - * This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). + * This event will automatically stop all media tracks and delete any HTML video element associated to it (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session (to do so it is a mandatory requirement to call `Session.unpublish()` * or/and `Session.disconnect()` in the previous session). See [[StreamEvent]] and [[VideoElementEvent]] to learn more. * * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event if the disconnected participant was publishing. * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) - * and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). + * and also deletes any HTML video element associated to that Subscriber (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object yourself. * See [[StreamEvent]] and [[VideoElementEvent]] to learn more. @@ -235,13 +235,13 @@ export class Session implements EventDispatcher { * #### Events dispatched * * The [[Subscriber]] object will dispatch a `videoElementCreated` event once the HTML video element has been added to DOM (only if you - * [let OpenVidu take care of the video players](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. + * [let OpenVidu take care of the video players](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). See [[VideoElementEvent]] to learn more. * * The [[Subscriber]] object will dispatch a `streamPlaying` event once the remote stream starts playing. See [[StreamManagerEvent]] to learn more. * * @param stream Stream object to subscribe to * @param targetElement HTML DOM element (or its `id` attribute) in which the video element of the Subscriber will be inserted (see [[SubscriberProperties.insertMode]]). If *null* or *undefined* no default video will be created for this Subscriber. - * You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos) section) + * You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](/en/stable/cheatsheet/manage-videos) section) * @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails. */ subscribe(stream: Stream, targetElement: string | HTMLElement, param3?: ((error: Error | undefined) => void) | SubscriberProperties, param4?: ((error: Error | undefined) => void)): Subscriber { @@ -324,7 +324,7 @@ export class Session implements EventDispatcher { * #### Events dispatched * * The [[Subscriber]] object will dispatch a `videoElementDestroyed` event for each video associated to it that was removed from DOM. - * Only videos [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed + * Only videos [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)) will be automatically removed * * See [[VideoElementEvent]] to learn more */ @@ -406,13 +406,13 @@ export class Session implements EventDispatcher { * * The [[Publisher]] object of the local participant will dispatch a `streamDestroyed` event. * This event will automatically stop all media tracks and delete any HTML video element associated to this Publisher - * (only those videos [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). + * (only those videos [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, the Publisher object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `streamDestroyed` if you want to clean the Publisher object on your own or re-publish it in a different Session. * * The [[Session]] object of every other participant connected to the session will dispatch a `streamDestroyed` event. * This event will automatically unsubscribe the Subscriber object from the session (this includes closing the WebRTCPeer connection and disposing all MediaStreamTracks) and - * delete any HTML video element associated to it (only those [created by OpenVidu Browser](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). + * delete any HTML video element associated to it (only those [created by OpenVidu Browser](/en/stable/cheatsheet/manage-videos/#let-openvidu-take-care-of-the-video-players)). * For every video removed, the Subscriber object will dispatch a `videoElementDestroyed` event. * Call `event.preventDefault()` upon event `streamDestroyed` to avoid this default behavior and take care of disposing and cleaning the Subscriber object on your own. * diff --git a/openvidu-browser/src/OpenVidu/StreamManager.ts b/openvidu-browser/src/OpenVidu/StreamManager.ts index 63318a58..5467ce60 100644 --- a/openvidu-browser/src/OpenVidu/StreamManager.ts +++ b/openvidu-browser/src/OpenVidu/StreamManager.ts @@ -234,7 +234,7 @@ export class StreamManager implements EventDispatcher { /** * Makes `video` element parameter display this [[stream]]. This is useful when you are - * [managing the video elements on your own](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos/#you-take-care-of-the-video-players) + * [managing the video elements on your own](/en/stable/cheatsheet/manage-videos/#you-take-care-of-the-video-players) * * Calling this method with a video already added to other Publisher/Subscriber will cause the video element to be * disassociated from that previous Publisher/Subscriber and to be associated to this one. diff --git a/openvidu-browser/src/OpenViduInternal/Events/RecordingEvent.ts b/openvidu-browser/src/OpenViduInternal/Events/RecordingEvent.ts index 3a8b1a6f..9117cd65 100644 --- a/openvidu-browser/src/OpenViduInternal/Events/RecordingEvent.ts +++ b/openvidu-browser/src/OpenViduInternal/Events/RecordingEvent.ts @@ -45,7 +45,7 @@ export class RecordingEvent extends Event { * For 'recordingStopped' event: * - "recordingStoppedByServer": the recording has been gracefully stopped by the application * - "sessionClosedByServer": the Session has been closed by the application - * - "automaticStop": see [Automatic stop of recordings](https://docs.openvidu.io/en/stable/advanced-features/recording/#automatic-stop-of-recordings) + * - "automaticStop": see [Automatic stop of recordings](/en/stable/advanced-features/recording/#automatic-stop-of-recordings) * - "mediaServerDisconnect": OpenVidu Media Node has crashed or lost its connection. A new Media Node instance is active and the recording has been stopped (no media streams are available in the new Media Node) * * For 'recordingStarted' empty string diff --git a/openvidu-browser/src/OpenViduInternal/Events/VideoElementEvent.ts b/openvidu-browser/src/OpenViduInternal/Events/VideoElementEvent.ts index d547bf76..d1d12ea8 100644 --- a/openvidu-browser/src/OpenViduInternal/Events/VideoElementEvent.ts +++ b/openvidu-browser/src/OpenViduInternal/Events/VideoElementEvent.ts @@ -22,7 +22,7 @@ import { StreamManager } from '../../OpenVidu/StreamManager'; /** * Defines the following events: * - `videoElementCreated`: dispatched by [[Publisher]] and [[Subscriber]] whenever a new HTML video element has been inserted into DOM by OpenVidu Browser library. See - * [Manage video players](https://docs.openvidu.io/en/stable/cheatsheet/manage-videos) section. + * [Manage video players](/en/stable/cheatsheet/manage-videos) section. * - `videoElementDestroyed`: dispatched by [[Publisher]] and [[Subscriber]] whenever an HTML video element has been removed from DOM by OpenVidu Browser library. */ export class VideoElementEvent extends Event { diff --git a/openvidu-java-client/generate-docs.sh b/openvidu-java-client/generate-docs.sh index 9666d3c2..3abb098a 100755 --- a/openvidu-java-client/generate-docs.sh +++ b/openvidu-java-client/generate-docs.sh @@ -6,7 +6,7 @@ if [[ -z "$BASEHREF_VERSION" ]]; then fi # Replace version from "stable" to the specified one in all Javadoc links -grep -rl '"/en/stable/' ./src | xargs sed -i -e 's|"/en/stable/|"/en/'${BASEHREF_VERSION}'/|g' +grep -rl '/en/stable/' ./src | xargs sed -i -e 's|/en/stable/|/en/'${BASEHREF_VERSION}'/|g' # Generate JavaDoc mvn javadoc:javadoc @@ -14,7 +14,7 @@ rm -rf ../../openvidu.io/api/openvidu-java-client/* cp -R ./target/site/apidocs/. ../../openvidu.io-docs/docs/api/openvidu-java-client # Return links to "stable" version -grep -rl '"/en/'${BASEHREF_VERSION}'/' ./src | xargs sed -i -e 's|"/en/'${BASEHREF_VERSION}'/|"/en/stable/|g' +grep -rl '/en/'${BASEHREF_VERSION}'/' ./src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g' # Add favicon to index.html sed -i -e 's/
//g' ../../openvidu.io-docs/docs/api/openvidu-java-client/index.html diff --git a/openvidu-java-client/src/main/java/io/openvidu/java/client/KurentoOptions.java b/openvidu-java-client/src/main/java/io/openvidu/java/client/KurentoOptions.java index 7b0d322a..22f9bedd 100644 --- a/openvidu-java-client/src/main/java/io/openvidu/java/client/KurentoOptions.java +++ b/openvidu-java-client/src/main/java/io/openvidu/java/client/KurentoOptions.java @@ -108,7 +108,7 @@ public class KurentoOptions { * Defines the maximum number of Kbps that the client owning the token will be * able to receive from Kurento Media Server. 0 means unconstrained. Giving a * value to this property will override the global configuration set in OpenVidu Server configuration (parameter *openvidu.streams.video.max-recv-bandwidth
) for every incoming
* stream of the user owning the token.