SDKs: remove record property from deprecated TokenOptions

pull/553/head
pabloFuente 2020-10-23 11:26:58 +02:00
parent 06fdc2de54
commit c17265a9b0
4 changed files with 18 additions and 38 deletions

View File

@ -100,7 +100,7 @@ public class Session {
*/
@Deprecated
public String generateToken() throws OpenViduJavaClientException, OpenViduHttpException {
return generateToken(new TokenOptions.Builder().data("").role(OpenViduRole.PUBLISHER).record(true).build());
return generateToken(new TokenOptions.Builder().data("").role(OpenViduRole.PUBLISHER).build());
}
/**
@ -468,7 +468,8 @@ public class Session {
* white; font-weight: bold; padding: 0px 5px; margin-right: 5px; border-radius:
* 3px; font-size: 13px; line-height:21px; font-family: Montserrat,
* sans-serif">PRO</a> Updates the properties of a Connection with a
* {@link io.openvidu.java.client.ConnectionProperties} object. Only these properties can be updated:
* {@link io.openvidu.java.client.ConnectionProperties} object. Only these
* properties can be updated:
* <ul>
* <li>{@link io.openvidu.java.client.ConnectionProperties.Builder#role(OpenViduRole)
* ConnectionProperties.Builder.role(OpenViduRole)}</li>
@ -482,7 +483,13 @@ public class Session {
* {@link io.openvidu.java.client.Session#fetch() Session.fetch()} or
* {@link io.openvidu.java.client.OpenVidu#fetch() OpenVidu.fetch()} to see the
* changes consequence of the execution of this method applied in the local
* objects.
* objects.<br>
* <br>
*
* The affected client will trigger one <a href=
* "/en/stable/api/openvidu-browser/classes/connectionpropertychangedevent.html"
* target="_blank">ConnectionPropertyChangedEvent</a> for each modified
* property.
*
* @param connectionId The Connection to modify
* @param connectionProperties A ConnectionProperties object with the new values

View File

@ -28,7 +28,6 @@ public class TokenOptions {
private OpenViduRole role;
private String data;
private Boolean record;
private KurentoOptions kurentoOptions;
/**
@ -39,14 +38,13 @@ public class TokenOptions {
private OpenViduRole role = OpenViduRole.PUBLISHER;
private String data;
private Boolean record = true;
private KurentoOptions kurentoOptions;
/**
* Builder for {@link io.openvidu.java.client.TokenOptions}.
*/
public TokenOptions build() {
return new TokenOptions(this.role, this.data, this.record, this.kurentoOptions);
return new TokenOptions(this.role, this.data, this.kurentoOptions);
}
/**
@ -84,17 +82,6 @@ public class TokenOptions {
return this;
}
/**
* Call this method to flag the streams published by the participant owning this
* token to be recorded or not. This only affects <a href=
* "https://docs.openvidu.io/en/stable/advanced-features/recording#selecting-streams-to-be-recorded"
* target="_blank">INDIVIDUAL recording</a>. If not set by default will be true.
*/
public Builder record(boolean record) {
this.record = record;
return this;
}
/**
* Call this method to set a {@link io.openvidu.java.client.KurentoOptions}
* object for this token.
@ -106,10 +93,9 @@ public class TokenOptions {
}
TokenOptions(OpenViduRole role, String data, Boolean record, KurentoOptions kurentoOptions) {
TokenOptions(OpenViduRole role, String data, KurentoOptions kurentoOptions) {
this.role = role;
this.data = data;
this.record = record;
this.kurentoOptions = kurentoOptions;
}
@ -128,13 +114,10 @@ public class TokenOptions {
}
/**
* Whether the streams published by the participant owning this token will be
* recorded or not. This only affects <a href=
* "https://docs.openvidu.io/en/stable/advanced-features/recording#selecting-streams-to-be-recorded"
* target="_blank">INDIVIDUAL recording</a>.
* Returns the Kurento options assigned to this token
*/
public Boolean record() {
return this.record;
public KurentoOptions getKurentoOptions() {
return this.kurentoOptions;
}
protected JsonObject toJsonObject(String sessionId) {
@ -150,11 +133,6 @@ public class TokenOptions {
} else {
json.add("data", JsonNull.INSTANCE);
}
if (record() != null) {
json.addProperty("record", record());
} else {
json.add("record", JsonNull.INSTANCE);
}
if (this.kurentoOptions != null) {
json.add("kurentoOptions", kurentoOptions.toJson());
}

View File

@ -114,7 +114,6 @@ export class Session {
session: this.sessionId,
role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : null,
data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : null,
record: !!tokenOptions ? tokenOptions.record : null,
kurentoOptions: (!!tokenOptions && !!tokenOptions.kurentoOptions) ? tokenOptions.kurentoOptions : null
});
axios.post(
@ -401,6 +400,9 @@ export class Session {
* 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.
*
* 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
*

View File

@ -37,13 +37,6 @@ export interface TokenOptions {
*/
data?: string;
/**
* Whether to record the streams published by the participant owning this token or not. This only affects [INDIVIDUAL recording](/en/stable/advanced-features/recording#selecting-streams-to-be-recorded)
*
* @default true
*/
record?: boolean;
/**
* **WARNING**: experimental option. This interface may change in the near future
*