@dronedeploy/rocos-js-sdk 3.0.1-alpha.39 → 3.0.1-alpha.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,6 +35,10 @@ export interface PeerConnectionParams {
35
35
  projectId: string;
36
36
  callsign: string;
37
37
  logLevel?: 'trace';
38
+ mimeType?: {
39
+ video?: string;
40
+ audio?: string;
41
+ };
38
42
  }
39
43
  interface InternalPeerConnectionParams extends PeerConnectionParams {
40
44
  endpoint: {
@@ -64,6 +68,7 @@ export declare class WebRTCConnection {
64
68
  private readonly projectId;
65
69
  private readonly callsign;
66
70
  private readonly logLevel?;
71
+ private sendOfferOptions?;
67
72
  private errorsSubject$;
68
73
  private streamsSubject$;
69
74
  private eventsSubject$;
@@ -51,6 +51,7 @@ class RTPWebRTCService extends BaseServiceAbstract_1.BaseServiceAbstract {
51
51
  projectId: params.projectId,
52
52
  callsign: params.callsign,
53
53
  logLevel: params.logLevel,
54
+ mimeType: params.mimeType,
54
55
  });
55
56
  }
56
57
  }
@@ -68,6 +69,10 @@ class WebRTCConnection {
68
69
  this.projectId = params.projectId;
69
70
  this.callsign = params.callsign;
70
71
  this.logLevel = params.logLevel;
72
+ this.sendOfferOptions = {
73
+ audioMimeType: params.mimeType?.audio,
74
+ videoMimeType: params.mimeType?.video,
75
+ };
71
76
  }
72
77
  get peerConnectionAvailable() {
73
78
  return !!this.pc;
@@ -148,6 +153,7 @@ class WebRTCConnection {
148
153
  },
149
154
  body: JSON.stringify({
150
155
  sdp,
156
+ options: this.sendOfferOptions,
151
157
  }),
152
158
  })
153
159
  .then((res) => res.json())
@@ -35,6 +35,10 @@ export interface PeerConnectionParams {
35
35
  projectId: string;
36
36
  callsign: string;
37
37
  logLevel?: 'trace';
38
+ mimeType?: {
39
+ video?: string;
40
+ audio?: string;
41
+ };
38
42
  }
39
43
  interface InternalPeerConnectionParams extends PeerConnectionParams {
40
44
  endpoint: {
@@ -64,6 +68,7 @@ export declare class WebRTCConnection {
64
68
  private readonly projectId;
65
69
  private readonly callsign;
66
70
  private readonly logLevel?;
71
+ private sendOfferOptions?;
67
72
  private errorsSubject$;
68
73
  private streamsSubject$;
69
74
  private eventsSubject$;
@@ -48,6 +48,7 @@ export class RTPWebRTCService extends BaseServiceAbstract {
48
48
  projectId: params.projectId,
49
49
  callsign: params.callsign,
50
50
  logLevel: params.logLevel,
51
+ mimeType: params.mimeType,
51
52
  });
52
53
  }
53
54
  }
@@ -64,6 +65,10 @@ export class WebRTCConnection {
64
65
  this.projectId = params.projectId;
65
66
  this.callsign = params.callsign;
66
67
  this.logLevel = params.logLevel;
68
+ this.sendOfferOptions = {
69
+ audioMimeType: params.mimeType?.audio,
70
+ videoMimeType: params.mimeType?.video,
71
+ };
67
72
  }
68
73
  get peerConnectionAvailable() {
69
74
  return !!this.pc;
@@ -144,6 +149,7 @@ export class WebRTCConnection {
144
149
  },
145
150
  body: JSON.stringify({
146
151
  sdp,
152
+ options: this.sendOfferOptions,
147
153
  }),
148
154
  })
149
155
  .then((res) => res.json())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.1-alpha.39",
3
+ "version": "3.0.1-alpha.40",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",