@@ -65,13 +65,14 @@ class Track {
65
65
66
66
class Operation {
67
67
68
- constructor ( id , transport , direction , tracks , legacy ) {
68
+ constructor ( id , transport , direction , tracks , legacy , attributes ) {
69
69
this . id = id ;
70
70
this . transport = transport ;
71
71
this . transportId = transport . id ;
72
72
this . direction = direction ;
73
73
this . tracks = tracks . map ( t => new Track ( this , t ) ) ;
74
74
this . legacy = legacy ;
75
+ this . attributes = attributes ;
75
76
this . promise = Promise . resolve ( ) ;
76
77
}
77
78
@@ -265,9 +266,9 @@ class RtcController extends EventEmitter {
265
266
266
267
// tracks = [ {mid, type, formatPreference, from} ]
267
268
// Return Promise
268
- initiate ( ownerId , sessionId , direction , origin , { transportId, tracks, legacy} ) {
269
+ initiate ( ownerId , sessionId , direction , origin , { transportId, tracks, legacy, attributes } ) {
269
270
log . debug ( `initiate, ownerId:${ ownerId } , sessionId:${ sessionId } , origin:${ origin } , ` +
270
- `transportId:${ transportId } , tracks:${ JSON . stringify ( tracks ) } , legacy:${ legacy } ` ) ;
271
+ `transportId:${ transportId } , tracks:${ JSON . stringify ( tracks ) } , legacy:${ legacy } , attributes: ${ attributes } ` ) ;
271
272
272
273
return this . _createTransportIfNeeded ( ownerId , sessionId , origin , transportId )
273
274
. then ( transport => {
@@ -281,7 +282,7 @@ class RtcController extends EventEmitter {
281
282
log . debug ( `operation exists:${ sessionId } ` ) ;
282
283
return Promise . reject ( `operation exists:${ sessionId } ` ) ;
283
284
}
284
- const op = new Operation ( sessionId , transport , direction , tracks , legacy ) ;
285
+ const op = new Operation ( sessionId , transport , direction , tracks , legacy , attributes ) ;
285
286
this . operations . set ( sessionId , op ) ;
286
287
// Return promise for this operation
287
288
const options = { transportId, tracks, controller : this . roomRpcId , owner : ownerId } ;
0 commit comments