mirror of https://github.com/OpenVidu/openvidu.git
Minor documentation fixes
parent
e384a07063
commit
64b241c170
|
@ -52,7 +52,7 @@ public class Connection {
|
||||||
/**
|
/**
|
||||||
* Returns the identifier of the Connection. You can call methods
|
* Returns the identifier of the Connection. You can call methods
|
||||||
* {@link io.openvidu.java.client.Session#forceDisconnect(String)} or
|
* {@link io.openvidu.java.client.Session#forceDisconnect(String)} or
|
||||||
* {@link io.openvidu.java.client.Session#updateConnection(String, TokenOptions)}
|
* {@link io.openvidu.java.client.Session#updateConnection(String, ConnectionProperties)}
|
||||||
* passing this property as parameter
|
* passing this property as parameter
|
||||||
*/
|
*/
|
||||||
public String getConnectionId() {
|
public String getConnectionId() {
|
||||||
|
@ -190,7 +190,11 @@ public class Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the token string associated to the Connection
|
* Returns the token string associated to the Connection. This is the value that
|
||||||
|
* must be sent to the client-side to be consumed in OpenVidu Browser method
|
||||||
|
* <a href=
|
||||||
|
* "https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/session.html#connect"
|
||||||
|
* target="_blank">Session.connect</a>.
|
||||||
*/
|
*/
|
||||||
public String getToken() {
|
public String getToken() {
|
||||||
return this.token;
|
return this.token;
|
||||||
|
|
|
@ -78,8 +78,8 @@ public class ConnectionProperties {
|
||||||
* {@link io.openvidu.java.client.ConnectionProperties.Builder#networkCache(int)
|
* {@link io.openvidu.java.client.ConnectionProperties.Builder#networkCache(int)
|
||||||
* networkCache}</li>
|
* networkCache}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* If not set by default will be @link
|
* If not set by default will be
|
||||||
* io.openvidu.java.client.ConnectionType#WEBRTC}.
|
* {@link io.openvidu.java.client.ConnectionType#WEBRTC}.
|
||||||
*/
|
*/
|
||||||
public Builder type(ConnectionType type) {
|
public Builder type(ConnectionType type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class Session {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as
|
* Same as
|
||||||
* {@link io.openvidu.java.client.Session#createConnection(ConnectionProperties)
|
* {@link io.openvidu.java.client.Session#createConnection(ConnectionProperties)}
|
||||||
* but with default ConnectionProperties values.
|
* but with default ConnectionProperties values.
|
||||||
*
|
*
|
||||||
* @return The generated {@link io.openvidu.java.client.Connection Connection}
|
* @return The generated {@link io.openvidu.java.client.Connection Connection}
|
||||||
|
|
|
@ -76,7 +76,8 @@ export class Connection {
|
||||||
connectionProperties: ConnectionProperties;
|
connectionProperties: ConnectionProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Token associated to the Connection
|
* Token associated to the Connection. This is the value that must be sent to the client-side to be consumed in OpenVidu Browser
|
||||||
|
* method [Session.connect](https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/session.html#connect).
|
||||||
*/
|
*/
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,11 @@
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Connection } from './Connection';
|
import { Connection } from './Connection';
|
||||||
import { Publisher } from './Publisher';
|
|
||||||
import { Recording } from './Recording';
|
import { Recording } from './Recording';
|
||||||
import { RecordingProperties } from './RecordingProperties';
|
import { RecordingProperties } from './RecordingProperties';
|
||||||
import { Session } from './Session';
|
import { Session } from './Session';
|
||||||
import { SessionProperties } from './SessionProperties';
|
import { SessionProperties } from './SessionProperties';
|
||||||
import { RecordingLayout } from './RecordingLayout';
|
import { RecordingLayout } from './RecordingLayout';
|
||||||
import { RecordingMode } from 'RecordingMode';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
|
@ -90,17 +88,18 @@ export class OpenVidu {
|
||||||
activeSessions: Session[] = [];
|
activeSessions: Session[] = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param urlOpenViduServer URL where your instance of OpenVidu Server is up an running.
|
* @param hostname URL where your instance of OpenVidu Server is up an running.
|
||||||
* It must be the full URL (e.g. `https://12.34.56.78:1234/`)
|
* It must be the full URL (e.g. `https://12.34.56.78:1234/`)
|
||||||
|
*
|
||||||
* @param secret Secret used on OpenVidu Server initialization
|
* @param secret Secret used on OpenVidu Server initialization
|
||||||
*/
|
*/
|
||||||
constructor(private urlOpenViduServer: string, secret: string) {
|
constructor(private hostname: string, secret: string) {
|
||||||
this.setHostnameAndPort();
|
this.setHostnameAndPort();
|
||||||
this.basicAuth = this.getBasicAuth(secret);
|
this.basicAuth = this.getBasicAuth(secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an OpenVidu session. You can call [[Session.getSessionId]] inside the resolved promise to retrieve the `sessionId`
|
* Creates an OpenVidu session. The session identifier will be available at property [[Session.sessionId]]
|
||||||
*
|
*
|
||||||
* @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not.
|
* @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not.
|
||||||
*/
|
*/
|
||||||
|
@ -669,7 +668,7 @@ export class OpenVidu {
|
||||||
private setHostnameAndPort(): void {
|
private setHostnameAndPort(): void {
|
||||||
let url: URL;
|
let url: URL;
|
||||||
try {
|
try {
|
||||||
url = new URL(this.urlOpenViduServer);
|
url = new URL(this.hostname);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('URL format incorrect', error);
|
console.error('URL format incorrect', error);
|
||||||
throw new Error('URL format incorrect: ' + error);
|
throw new Error('URL format incorrect: ' + error);
|
||||||
|
|
|
@ -96,13 +96,6 @@ export class Session {
|
||||||
this.properties.defaultRecordingLayout = !!this.properties.defaultRecordingLayout ? this.properties.defaultRecordingLayout : RecordingLayout.BEST_FIT;
|
this.properties.defaultRecordingLayout = !!this.properties.defaultRecordingLayout ? this.properties.defaultRecordingLayout : RecordingLayout.BEST_FIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the unique identifier of the Session
|
|
||||||
*/
|
|
||||||
public getSessionId(): string {
|
|
||||||
return this.sessionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use [[Session.createConnection]] instead to get a [[Connection]] object.
|
* @deprecated Use [[Session.createConnection]] instead to get a [[Connection]] object.
|
||||||
*
|
*
|
||||||
|
@ -449,6 +442,13 @@ export class Session {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hidden
|
||||||
|
*/
|
||||||
|
public getSessionId(): string {
|
||||||
|
return this.sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -347,11 +347,11 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
||||||
@EventListener(ApplicationReadyEvent.class)
|
@EventListener(ApplicationReadyEvent.class)
|
||||||
public void whenReady() {
|
public void whenReady() {
|
||||||
|
|
||||||
String dashboardUrl = httpUrl + "dashboard/";
|
String dashboardUrl = httpUrl + config.getOpenViduFrontendDefaultPath().replaceAll("^/", "");
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
String msg = "\n\n----------------------------------------------------\n" + "\n" + " OpenVidu is ready!\n"
|
String msg = "\n\n----------------------------------------------------\n" + "\n" + " OpenVidu is ready!\n"
|
||||||
+ " ---------------------------\n" + "\n" + " * OpenVidu Server: " + httpUrl + "\n" + "\n"
|
+ " ---------------------------\n" + "\n" + " * OpenVidu Server URL: " + httpUrl + "\n" + "\n"
|
||||||
+ " * OpenVidu Dashboard: " + dashboardUrl + "\n" + "\n"
|
+ " * OpenVidu Dashboard: " + dashboardUrl + "\n" + "\n"
|
||||||
+ "----------------------------------------------------\n";
|
+ "----------------------------------------------------\n";
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
Loading…
Reference in New Issue