diff --git a/openvidu-node-client/docs/assets/js/search.js b/openvidu-node-client/docs/assets/js/search.js index 59079305..8344f10a 100644 --- a/openvidu-node-client/docs/assets/js/search.js +++ b/openvidu-node-client/docs/assets/js/search.js @@ -1,3 +1,3 @@ var typedoc = typedoc || {}; typedoc.search = typedoc.search || {}; - typedoc.search.data = {"kinds":{"4":"Enumeration","16":"Enumeration member","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method"},"rows":[{"id":0,"kind":4,"name":"MediaMode","url":"enums/mediamode.html","classes":"tsd-kind-enum"},{"id":1,"kind":16,"name":"RELAYED","url":"enums/mediamode.html#relayed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"MediaMode"},{"id":2,"kind":16,"name":"ROUTED","url":"enums/mediamode.html#routed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"MediaMode"},{"id":3,"kind":4,"name":"OpenViduRole","url":"enums/openvidurole.html","classes":"tsd-kind-enum"},{"id":4,"kind":16,"name":"SUBSCRIBER","url":"enums/openvidurole.html#subscriber","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":5,"kind":16,"name":"PUBLISHER","url":"enums/openvidurole.html#publisher","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":6,"kind":16,"name":"MODERATOR","url":"enums/openvidurole.html#moderator","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":7,"kind":4,"name":"RecordingLayout","url":"enums/recordinglayout.html","classes":"tsd-kind-enum"},{"id":8,"kind":16,"name":"BEST_FIT","url":"enums/recordinglayout.html#best_fit","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":9,"kind":16,"name":"PICTURE_IN_PICTURE","url":"enums/recordinglayout.html#picture_in_picture","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":10,"kind":16,"name":"VERTICAL_PRESENTATION","url":"enums/recordinglayout.html#vertical_presentation","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":11,"kind":16,"name":"HORIZONTAL_PRESENTATION","url":"enums/recordinglayout.html#horizontal_presentation","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":12,"kind":16,"name":"CUSTOM","url":"enums/recordinglayout.html#custom","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":13,"kind":4,"name":"RecordingMode","url":"enums/recordingmode.html","classes":"tsd-kind-enum"},{"id":14,"kind":16,"name":"ALWAYS","url":"enums/recordingmode.html#always","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingMode"},{"id":15,"kind":16,"name":"MANUAL","url":"enums/recordingmode.html#manual","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingMode"},{"id":16,"kind":256,"name":"SessionProperties","url":"interfaces/sessionproperties.html","classes":"tsd-kind-interface"},{"id":17,"kind":1024,"name":"mediaMode","url":"interfaces/sessionproperties.html#mediamode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":18,"kind":1024,"name":"recordingMode","url":"interfaces/sessionproperties.html#recordingmode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":19,"kind":1024,"name":"defaultRecordingLayout","url":"interfaces/sessionproperties.html#defaultrecordinglayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":20,"kind":1024,"name":"defaultCustomLayout","url":"interfaces/sessionproperties.html#defaultcustomlayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":21,"kind":1024,"name":"customSessionId","url":"interfaces/sessionproperties.html#customsessionid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":22,"kind":256,"name":"TokenOptions","url":"interfaces/tokenoptions.html","classes":"tsd-kind-interface"},{"id":23,"kind":1024,"name":"data","url":"interfaces/tokenoptions.html#data","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TokenOptions"},{"id":24,"kind":1024,"name":"role","url":"interfaces/tokenoptions.html#role","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TokenOptions"},{"id":25,"kind":128,"name":"Session","url":"classes/session.html","classes":"tsd-kind-class"},{"id":26,"kind":1024,"name":"sessionId","url":"classes/session.html#sessionid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":27,"kind":1024,"name":"properties","url":"classes/session.html#properties","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":28,"kind":512,"name":"constructor","url":"classes/session.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Session"},{"id":29,"kind":2048,"name":"getSessionId","url":"classes/session.html#getsessionid","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":30,"kind":2048,"name":"generateToken","url":"classes/session.html#generatetoken","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":31,"kind":128,"name":"Recording","url":"classes/recording.html","classes":"tsd-kind-class"},{"id":32,"kind":1024,"name":"id","url":"classes/recording.html#id","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":33,"kind":1024,"name":"sessionId","url":"classes/recording.html#sessionid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":34,"kind":1024,"name":"createdAt","url":"classes/recording.html#createdat","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":35,"kind":1024,"name":"size","url":"classes/recording.html#size","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":36,"kind":1024,"name":"duration","url":"classes/recording.html#duration","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":37,"kind":1024,"name":"url","url":"classes/recording.html#url","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":38,"kind":1024,"name":"hasAudio","url":"classes/recording.html#hasaudio","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":39,"kind":1024,"name":"hasVideo","url":"classes/recording.html#hasvideo","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":40,"kind":1024,"name":"status","url":"classes/recording.html#status-1","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":41,"kind":1024,"name":"name","url":"classes/recording.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":42,"kind":1024,"name":"recordingLayout","url":"classes/recording.html#recordinglayout","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":43,"kind":512,"name":"constructor","url":"classes/recording.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Recording"},{"id":44,"kind":4,"name":"Status","url":"enums/recording.status.html","classes":"tsd-kind-enum tsd-parent-kind-class tsd-is-static","parent":"Recording"},{"id":45,"kind":16,"name":"starting","url":"enums/recording.status.html#starting","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":46,"kind":16,"name":"started","url":"enums/recording.status.html#started","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":47,"kind":16,"name":"stopped","url":"enums/recording.status.html#stopped","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":48,"kind":16,"name":"available","url":"enums/recording.status.html#available","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":49,"kind":16,"name":"failed","url":"enums/recording.status.html#failed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":50,"kind":256,"name":"RecordingProperties","url":"interfaces/recordingproperties.html","classes":"tsd-kind-interface"},{"id":51,"kind":1024,"name":"name","url":"interfaces/recordingproperties.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":52,"kind":1024,"name":"recordingLayout","url":"interfaces/recordingproperties.html#recordinglayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":53,"kind":1024,"name":"customLayout","url":"interfaces/recordingproperties.html#customlayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":54,"kind":128,"name":"OpenVidu","url":"classes/openvidu.html","classes":"tsd-kind-class"},{"id":55,"kind":512,"name":"constructor","url":"classes/openvidu.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"OpenVidu"},{"id":56,"kind":2048,"name":"createSession","url":"classes/openvidu.html#createsession","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":57,"kind":2048,"name":"startRecording","url":"classes/openvidu.html#startrecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":58,"kind":2048,"name":"stopRecording","url":"classes/openvidu.html#stoprecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":59,"kind":2048,"name":"getRecording","url":"classes/openvidu.html#getrecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":60,"kind":2048,"name":"listRecordings","url":"classes/openvidu.html#listrecordings","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":61,"kind":2048,"name":"deleteRecording","url":"classes/openvidu.html#deleterecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"4":"Enumeration","16":"Enumeration member","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method"},"rows":[{"id":0,"kind":4,"name":"OpenViduRole","url":"enums/openvidurole.html","classes":"tsd-kind-enum"},{"id":1,"kind":16,"name":"SUBSCRIBER","url":"enums/openvidurole.html#subscriber","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":2,"kind":16,"name":"PUBLISHER","url":"enums/openvidurole.html#publisher","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":3,"kind":16,"name":"MODERATOR","url":"enums/openvidurole.html#moderator","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"OpenViduRole"},{"id":4,"kind":128,"name":"Publisher","url":"classes/publisher.html","classes":"tsd-kind-class"},{"id":5,"kind":1024,"name":"streamId","url":"classes/publisher.html#streamid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":6,"kind":1024,"name":"hasAudio","url":"classes/publisher.html#hasaudio","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":7,"kind":1024,"name":"hasVideo","url":"classes/publisher.html#hasvideo","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":8,"kind":1024,"name":"audioActive","url":"classes/publisher.html#audioactive","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":9,"kind":1024,"name":"videoActive","url":"classes/publisher.html#videoactive","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":10,"kind":1024,"name":"frameRate","url":"classes/publisher.html#framerate","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":11,"kind":1024,"name":"typeOfVideo","url":"classes/publisher.html#typeofvideo","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":12,"kind":1024,"name":"videoDimensions","url":"classes/publisher.html#videodimensions","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Publisher"},{"id":13,"kind":512,"name":"constructor","url":"classes/publisher.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Publisher"},{"id":14,"kind":128,"name":"Connection","url":"classes/connection.html","classes":"tsd-kind-class"},{"id":15,"kind":1024,"name":"connectionId","url":"classes/connection.html#connectionid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":16,"kind":1024,"name":"role","url":"classes/connection.html#role","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":17,"kind":1024,"name":"token","url":"classes/connection.html#token","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":18,"kind":1024,"name":"serverData","url":"classes/connection.html#serverdata","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":19,"kind":1024,"name":"clientData","url":"classes/connection.html#clientdata","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":20,"kind":1024,"name":"publishers","url":"classes/connection.html#publishers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":21,"kind":1024,"name":"subscribers","url":"classes/connection.html#subscribers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Connection"},{"id":22,"kind":4,"name":"MediaMode","url":"enums/mediamode.html","classes":"tsd-kind-enum"},{"id":23,"kind":16,"name":"RELAYED","url":"enums/mediamode.html#relayed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"MediaMode"},{"id":24,"kind":16,"name":"ROUTED","url":"enums/mediamode.html#routed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"MediaMode"},{"id":25,"kind":4,"name":"RecordingLayout","url":"enums/recordinglayout.html","classes":"tsd-kind-enum"},{"id":26,"kind":16,"name":"BEST_FIT","url":"enums/recordinglayout.html#best_fit","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":27,"kind":16,"name":"PICTURE_IN_PICTURE","url":"enums/recordinglayout.html#picture_in_picture","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":28,"kind":16,"name":"VERTICAL_PRESENTATION","url":"enums/recordinglayout.html#vertical_presentation","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":29,"kind":16,"name":"HORIZONTAL_PRESENTATION","url":"enums/recordinglayout.html#horizontal_presentation","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":30,"kind":16,"name":"CUSTOM","url":"enums/recordinglayout.html#custom","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingLayout"},{"id":31,"kind":4,"name":"RecordingMode","url":"enums/recordingmode.html","classes":"tsd-kind-enum"},{"id":32,"kind":16,"name":"ALWAYS","url":"enums/recordingmode.html#always","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingMode"},{"id":33,"kind":16,"name":"MANUAL","url":"enums/recordingmode.html#manual","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RecordingMode"},{"id":34,"kind":256,"name":"SessionProperties","url":"interfaces/sessionproperties.html","classes":"tsd-kind-interface"},{"id":35,"kind":1024,"name":"mediaMode","url":"interfaces/sessionproperties.html#mediamode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":36,"kind":1024,"name":"recordingMode","url":"interfaces/sessionproperties.html#recordingmode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":37,"kind":1024,"name":"defaultRecordingLayout","url":"interfaces/sessionproperties.html#defaultrecordinglayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":38,"kind":1024,"name":"defaultCustomLayout","url":"interfaces/sessionproperties.html#defaultcustomlayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":39,"kind":1024,"name":"customSessionId","url":"interfaces/sessionproperties.html#customsessionid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SessionProperties"},{"id":40,"kind":256,"name":"TokenOptions","url":"interfaces/tokenoptions.html","classes":"tsd-kind-interface"},{"id":41,"kind":1024,"name":"data","url":"interfaces/tokenoptions.html#data","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TokenOptions"},{"id":42,"kind":1024,"name":"role","url":"interfaces/tokenoptions.html#role","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"TokenOptions"},{"id":43,"kind":128,"name":"Session","url":"classes/session.html","classes":"tsd-kind-class"},{"id":44,"kind":1024,"name":"sessionId","url":"classes/session.html#sessionid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":45,"kind":1024,"name":"properties","url":"classes/session.html#properties","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":46,"kind":1024,"name":"activeConnections","url":"classes/session.html#activeconnections","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":47,"kind":1024,"name":"recording","url":"classes/session.html#recording","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Session"},{"id":48,"kind":2048,"name":"getSessionId","url":"classes/session.html#getsessionid","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":49,"kind":2048,"name":"generateToken","url":"classes/session.html#generatetoken","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":50,"kind":2048,"name":"close","url":"classes/session.html#close","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":51,"kind":2048,"name":"fetch","url":"classes/session.html#fetch","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":52,"kind":2048,"name":"forceDisconnect","url":"classes/session.html#forcedisconnect","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":53,"kind":2048,"name":"forceUnpublish","url":"classes/session.html#forceunpublish","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Session"},{"id":54,"kind":128,"name":"Recording","url":"classes/recording.html","classes":"tsd-kind-class"},{"id":55,"kind":1024,"name":"id","url":"classes/recording.html#id","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":56,"kind":1024,"name":"sessionId","url":"classes/recording.html#sessionid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":57,"kind":1024,"name":"createdAt","url":"classes/recording.html#createdat","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":58,"kind":1024,"name":"size","url":"classes/recording.html#size","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":59,"kind":1024,"name":"duration","url":"classes/recording.html#duration","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":60,"kind":1024,"name":"url","url":"classes/recording.html#url","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":61,"kind":1024,"name":"hasAudio","url":"classes/recording.html#hasaudio","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":62,"kind":1024,"name":"hasVideo","url":"classes/recording.html#hasvideo","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":63,"kind":1024,"name":"status","url":"classes/recording.html#status-1","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":64,"kind":1024,"name":"name","url":"classes/recording.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":65,"kind":1024,"name":"recordingLayout","url":"classes/recording.html#recordinglayout","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Recording"},{"id":66,"kind":4,"name":"Status","url":"enums/recording.status.html","classes":"tsd-kind-enum tsd-parent-kind-class tsd-is-static","parent":"Recording"},{"id":67,"kind":16,"name":"starting","url":"enums/recording.status.html#starting","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":68,"kind":16,"name":"started","url":"enums/recording.status.html#started","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":69,"kind":16,"name":"stopped","url":"enums/recording.status.html#stopped","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":70,"kind":16,"name":"available","url":"enums/recording.status.html#available","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":71,"kind":16,"name":"failed","url":"enums/recording.status.html#failed","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"Recording.Status"},{"id":72,"kind":256,"name":"RecordingProperties","url":"interfaces/recordingproperties.html","classes":"tsd-kind-interface"},{"id":73,"kind":1024,"name":"name","url":"interfaces/recordingproperties.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":74,"kind":1024,"name":"recordingLayout","url":"interfaces/recordingproperties.html#recordinglayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":75,"kind":1024,"name":"customLayout","url":"interfaces/recordingproperties.html#customlayout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecordingProperties"},{"id":76,"kind":128,"name":"OpenVidu","url":"classes/openvidu.html","classes":"tsd-kind-class"},{"id":77,"kind":1024,"name":"activeSessions","url":"classes/openvidu.html#activesessions","classes":"tsd-kind-property tsd-parent-kind-class","parent":"OpenVidu"},{"id":78,"kind":512,"name":"constructor","url":"classes/openvidu.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"OpenVidu"},{"id":79,"kind":2048,"name":"createSession","url":"classes/openvidu.html#createsession","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":80,"kind":2048,"name":"startRecording","url":"classes/openvidu.html#startrecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":81,"kind":2048,"name":"stopRecording","url":"classes/openvidu.html#stoprecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":82,"kind":2048,"name":"getRecording","url":"classes/openvidu.html#getrecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":83,"kind":2048,"name":"listRecordings","url":"classes/openvidu.html#listrecordings","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":84,"kind":2048,"name":"deleteRecording","url":"classes/openvidu.html#deleterecording","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"},{"id":85,"kind":2048,"name":"fetch","url":"classes/openvidu.html#fetch","classes":"tsd-kind-method tsd-parent-kind-class","parent":"OpenVidu"}]}; \ No newline at end of file diff --git a/openvidu-node-client/docs/classes/connection.html b/openvidu-node-client/docs/classes/connection.html new file mode 100644 index 00000000..eab79598 --- /dev/null +++ b/openvidu-node-client/docs/classes/connection.html @@ -0,0 +1,361 @@ + + + + + + Connection | OpenVidu Node Client + + + + + + +
+
+
+
+ +
+
+ Options +
+
+ All +
    +
  • Public
  • +
  • Public/Protected
  • +
  • All
  • +
+
+ + + + +
+
+ Menu +
+
+
+
+
+
+ +

Class Connection

+
+
+
+
+
+
+
+ +
+
+

Hierarchy

+
    +
  • + Connection +
  • +
+
+
+

Index

+
+
+
+

Properties

+ +
+
+
+
+
+

Properties

+
+ +

clientData

+
clientData: string
+ +
+
+

Data associated to the connection on the client-side. This value is set with second parameter of method + Session.connect in OpenVidu Browser

+
+
+
+
+ +

connectionId

+
connectionId: string
+ +
+
+

Identifier of the connection. You can call Session.forceDisconnect passing this property as parameter

+
+
+
+
+ +

publishers

+
publishers: Publisher[] = []
+ +
+
+

Array of Publisher objects this particular Connection is publishing to the Session (each Publisher object has one Stream, uniquely + identified by its streamId). You can call Session.forceUnpublish passing any of this values as parameter

+
+
+
+
+ +

role

+ + +
+
+

Role of the connection

+
+
+
+
+ +

serverData

+
serverData: string
+ +
+
+

Data associated to the connection on the server-side. This value is set with property TokenOptions.data when calling Session.generateToken

+
+
+
+
+ +

subscribers

+
subscribers: string[] = []
+ +
+
+

Array of streams (their streamId properties) this particular Connection is subscribed to. Each one always corresponds to one + Publisher of some other Connection: each string of this array must be equal to one Publisher.streamId of other Connection

+
+
+
+
+ +

token

+
token: string
+ +
+
+

Token associated to the connection

+
+
+
+
+
+ +
+
+ +
+

Generated using TypeDoc

+
+
+ + + + \ No newline at end of file diff --git a/openvidu-node-client/docs/classes/openvidu.html b/openvidu-node-client/docs/classes/openvidu.html index 4b3764b0..e06d15dc 100644 --- a/openvidu-node-client/docs/classes/openvidu.html +++ b/openvidu-node-client/docs/classes/openvidu.html @@ -85,11 +85,18 @@
  • constructor
  • +
    +

    Properties

    + +

    Methods

    +
    +

    Properties

    +
    + +

    activeSessions

    +
    activeSessions: Session[] = []
    + +
    +
    +

    Array of active sessions. This value will remain unchanged since the last time method OpenVidu.fetch + was called. Exceptions to this rule are:

    +
    + +

    To get the array of active sessions with their current actual value, you must call OpenVidu.fetch before consulting + property activeSessions

    +
    +
    +

    Methods

    @@ -152,12 +188,12 @@
  • -

    Creates an OpenVidu session. You can call Session.getSessionId in the resolved promise to retrieve the sessionId

    +

    Creates an OpenVidu session. You can call Session.getSessionId inside the resolved promise to retrieve the sessionId

    Parameters

    @@ -181,7 +217,7 @@
  • @@ -206,6 +242,31 @@
  • +
    + +

    fetch

    + + +

    getRecording

    @@ -216,7 +277,7 @@
  • @@ -251,7 +312,7 @@
  • @@ -276,7 +337,7 @@
  • @@ -307,7 +368,7 @@
  • @@ -329,7 +390,8 @@
    name: string
    -

    The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped)

    +

    The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped) + WARNING: this parameter follows an overwriting policy. If you name two recordings the same, the newest MP4 file will overwrite the oldest one

  • @@ -346,7 +408,7 @@
  • @@ -389,7 +451,7 @@
  • @@ -439,6 +501,9 @@
  • RecordingMode
  • +
  • + Connection +
  • -
    -

    Constructors

    -
    - -

    constructor

    - - -
    -

    Properties

    @@ -144,7 +119,7 @@
    createdAt: number
    @@ -159,7 +134,7 @@
    duration: number = 0
    @@ -174,7 +149,7 @@
    hasAudio: boolean = true
    @@ -189,7 +164,7 @@
    hasVideo: boolean = true
    @@ -204,7 +179,7 @@
    id: string
    @@ -219,7 +194,7 @@
    name: string
    @@ -236,7 +211,7 @@
    recordingLayout: RecordingLayout
    @@ -251,7 +226,7 @@
    sessionId: string
    @@ -266,7 +241,7 @@
    size: number = 0
    @@ -281,7 +256,7 @@
    status: Status
    @@ -296,7 +271,7 @@
    url: string
    @@ -329,9 +304,15 @@
  • RecordingMode
  • +
  • + Connection +
  • OpenVidu
  • +
  • + Publisher +
  • -
    -

    Constructors

    -
    - -

    constructor

    - -
      -
    • - -

      Parameters

      -
        -
      • -
        hostname: string
        -
      • -
      • -
        port: number
        -
      • -
      • -
        basicAuth: string
        -
      • -
      • -
        Optional properties: SessionProperties
        -
      • -
      -

      Returns Session

      -
    • -
    -
    -

    Properties

    +
    + +

    activeConnections

    +
    activeConnections: Connection[] = []
    + +
    +
    +

    Array of active connections to the session. This property always initialize as an empty array and + will remain unchanged since the last time method Session.fetch was called. Exceptions to this rule are:

    +
    + +

    To get the array of active connections with their current actual value, you must call Session.fetch before consulting + property activeConnections

    +
    +

    properties

    properties: SessionProperties
    +
    +
    +

    Properties defining the session

    +
    +
    +
    +
    + +

    recording

    +
    recording: boolean = false
    + +
    +
    +

    Whether the session is being recorded or not

    +
    +
    @@ -155,13 +162,130 @@
    sessionId: string
    +
    +
    +

    Unique identifier of the Session

    +
    +

    Methods

    +
    + +

    close

    +
      +
    • close(): Promise<any>
    • +
    +
      +
    • + +
      +
      +

      Gracefully closes the Session: unpublishes all streams and evicts every participant

      +
      +
      +

      Returns Promise<any>

      +

      A Promise that is resolved if the session has been closed successfully and rejected with an Error object if not

      +
    • +
    +
    +
    + +

    fetch

    +
      +
    • fetch(): Promise<boolean>
    • +
    +
      +
    • + +
      +
      +

      Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of active + connections to the Session (Session.activeConnections) and use those values to call Session.forceDisconnect or Session.forceUnpublish

      +
      +
      +

      Returns Promise<boolean>

      +

      A promise resolved to true if the Session status has changed with respect to the server, or to false if not. + This applies to any property or sub-property of the Session object

      +
    • +
    +
    +
    + +

    forceDisconnect

    +
      +
    • forceDisconnect(connection: string | Connection): Promise<any>
    • +
    +
      +
    • + +
      +
      +

      Forces the user with Connection connectionId to leave the session. OpenVidu Browser will trigger the proper events on the client-side + (streamDestroyed, connectionDestroyed, sessionDisconnected) with reason set to "forceDisconnectByServer"

      +
      +

      You can get connection parameter from Session.activeConnections array (Connection.connectionId for getting each connectionId property). + Remember to call Session.fetch before to fetch the current actual properties of the Session from OpenVidu Server

      +
      +

      Parameters

      + +

      Returns Promise<any>

      +

      A Promise that is resolved if the user was successfully disconnected and rejected with an Error object if not

      +
    • +
    +
    +
    + +

    forceUnpublish

    +
      +
    • forceUnpublish(publisher: string | Publisher): Promise<any>
    • +
    +
      +
    • + +
      +
      +

      Forces some user to unpublish a Stream (identified by its streamId or the corresponding Publisher object owning it). + OpenVidu Browser will trigger the proper events on the client-side (streamDestroyed) with reason set to "forceUnpublishByServer".

      +
      +

      You can get publisher parameter from Connection.publishers array (Publisher.streamId for getting each streamId property). + Remember to call Session.fetch before to fetch the current actual properties of the Session from OpenVidu Server

      +
      +

      Parameters

      + +

      Returns Promise<any>

      +

      A Promise that is resolved if the stream was successfully unpublished and rejected with an Error object if not

      +
    • +
    +

    generateToken

    @@ -172,7 +296,7 @@
  • @@ -201,7 +325,7 @@
  • @@ -237,9 +361,15 @@
  • RecordingMode
  • +
  • + Connection +
  • OpenVidu
  • +
  • + Publisher +
  • Recording
  • @@ -248,15 +378,30 @@
  • Session
    • @@ -218,9 +231,6 @@
  • -
  • - constructor -
  • createdAt
  • diff --git a/openvidu-node-client/docs/enums/recordinglayout.html b/openvidu-node-client/docs/enums/recordinglayout.html index ac5009a9..843dfbe1 100644 --- a/openvidu-node-client/docs/enums/recordinglayout.html +++ b/openvidu-node-client/docs/enums/recordinglayout.html @@ -67,6 +67,13 @@
    +
    + +

    Index

    @@ -92,7 +99,7 @@
    BEST_FIT: = "BEST_FIT"
    @@ -107,7 +114,7 @@
    CUSTOM: = "CUSTOM"
    @@ -122,7 +129,7 @@
    HORIZONTAL_PRESENTATION: = "VERTICAL_PRESENTATION"
    @@ -137,7 +144,7 @@
    PICTURE_IN_PICTURE: = "PICTURE_IN_PICTURE"
    @@ -152,7 +159,7 @@
    VERTICAL_PRESENTATION: = "VERTICAL_PRESENTATION"
    @@ -206,9 +213,15 @@
  • RecordingMode
  • +
  • + Connection +
  • OpenVidu
  • +
  • + Publisher +
  • Recording
  • diff --git a/openvidu-node-client/docs/enums/recordingmode.html b/openvidu-node-client/docs/enums/recordingmode.html index 734d6be7..a1589b27 100644 --- a/openvidu-node-client/docs/enums/recordingmode.html +++ b/openvidu-node-client/docs/enums/recordingmode.html @@ -67,6 +67,13 @@
    +
    + +

    Index

    @@ -89,7 +96,7 @@
    ALWAYS: = "ALWAYS"
    @@ -105,7 +112,7 @@
    MANUAL: = "MANUAL"
    @@ -151,9 +158,15 @@
      +
    • + Connection +
    • OpenVidu
    • +
    • + Publisher +
    • Recording
    • diff --git a/openvidu-node-client/docs/index.html b/openvidu-node-client/docs/index.html index 26bfcbc5..028c673e 100644 --- a/openvidu-node-client/docs/index.html +++ b/openvidu-node-client/docs/index.html @@ -80,7 +80,9 @@

      Classes

      @@ -119,9 +121,15 @@
    • RecordingMode
    • +
    • + Connection +
    • OpenVidu
    • +
    • + Publisher +
    • Recording
    • diff --git a/openvidu-node-client/docs/interfaces/recordingproperties.html b/openvidu-node-client/docs/interfaces/recordingproperties.html index 882a0126..870da168 100644 --- a/openvidu-node-client/docs/interfaces/recordingproperties.html +++ b/openvidu-node-client/docs/interfaces/recordingproperties.html @@ -67,6 +67,13 @@
      +
      + +

      Hierarchy

        @@ -98,7 +105,7 @@
        customLayout: string
        @@ -114,12 +121,13 @@
        name: string
        -

        The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped)

        +

        The name you want to give to the video file. You can access this same value in your clients on recording events (recordingStarted, recordingStopped). + WARNING: this parameter follows an overwriting policy. If you name two recordings the same, the newest MP4 file will overwrite the oldest one

      @@ -129,7 +137,7 @@
      recordingLayout: RecordingLayout
      @@ -162,9 +170,15 @@
    • RecordingMode
    • +
    • + Connection +
    • OpenVidu
    • +
    • + Publisher +
    • Recording
    • diff --git a/openvidu-node-client/docs/interfaces/sessionproperties.html b/openvidu-node-client/docs/interfaces/sessionproperties.html index 7e9d36c9..ce7045e7 100644 --- a/openvidu-node-client/docs/interfaces/sessionproperties.html +++ b/openvidu-node-client/docs/interfaces/sessionproperties.html @@ -67,6 +67,13 @@
      +
      + +

      Hierarchy

      @@ -133,14 +141,14 @@
      defaultRecordingLayout: RecordingLayout
      -

      Default value used to initialize property RecordingProperties.recordingLayout of every recording of this session. - You can easily override this value later by setting RecordingProperties.recordingLayout to any other value

      +

      Default value used to initialize property RecordingProperties.recordingLayout of every recording of this session.

      +

      You can easily override this value later by setting RecordingProperties.recordingLayout to any other value

      @@ -149,7 +157,7 @@
      mediaMode: MediaMode
      @@ -165,7 +173,7 @@
      recordingMode: RecordingMode
      @@ -198,9 +206,15 @@
    • RecordingMode
    • +
    • + Connection +
    • OpenVidu
    • +
    • + Publisher +
    • Recording
    • diff --git a/openvidu-node-client/docs/interfaces/tokenoptions.html b/openvidu-node-client/docs/interfaces/tokenoptions.html index 12ffaf8a..7c5ed4a1 100644 --- a/openvidu-node-client/docs/interfaces/tokenoptions.html +++ b/openvidu-node-client/docs/interfaces/tokenoptions.html @@ -67,6 +67,13 @@
      +
      +
      + +
      +

      Hierarchy

        @@ -97,7 +104,7 @@
        data: string
        @@ -117,7 +124,7 @@
        @@ -150,9 +157,15 @@
      • RecordingMode
      • +
      • + Connection +
      • OpenVidu
      • +
      • + Publisher +
      • Recording
      • diff --git a/openvidu-node-client/lib/OpenVidu.d.ts b/openvidu-node-client/lib/OpenVidu.d.ts index cfaf06c9..0fa48a12 100644 --- a/openvidu-node-client/lib/OpenVidu.d.ts +++ b/openvidu-node-client/lib/OpenVidu.d.ts @@ -4,20 +4,62 @@ import { Recording } from './Recording'; import { RecordingProperties } from './RecordingProperties'; export declare class OpenVidu { private urlOpenViduServer; - private static readonly API_RECORDINGS; - private static readonly API_RECORDINGS_START; - private static readonly API_RECORDINGS_STOP; - private hostname; - private port; - private basicAuth; private Buffer; + /** + * @hidden + */ + static hostname: string; + /** + * @hidden + */ + static port: number; + /** + * @hidden + */ + static basicAuth: string; + /** + * @hidden + */ + static readonly API_RECORDINGS: string; + /** + * @hidden + */ + static readonly API_RECORDINGS_START: string; + /** + * @hidden + */ + static readonly API_RECORDINGS_STOP: string; + /** + * @hidden + */ + static readonly API_SESSIONS: string; + /** + * @hidden + */ + static readonly API_TOKENS: string; + private static o; + /** + * Array of active sessions. **This value will remain unchanged since the last time method [[OpenVidu.fetch]] + * was called**. Exceptions to this rule are: + * + * - Calling [[Session.fetch]] updates that specific Session status + * - Calling [[Session.close]] automatically removes the Session from the list of active Sessions + * - Calling [[Session.forceDisconnect]] automatically updates the inner affected connections for that specific Session + * - Calling [[Session.forceUnpublish]] also automatically updates the inner affected connections for that specific Session + * - Calling [[OpenVidu.startRecording]] and [[OpenVidu.stopRecording]] automatically updates the recording status of the + * Session ([[Session.recording]]) + * + * To get the array of active sessions with their current actual value, you must call [[OpenVidu.fetch]] before consulting + * property [[activeSessions]] + */ + activeSessions: Session[]; /** * @param urlOpenViduServer Public accessible IP where your instance of OpenVidu Server is up an running * @param secret Secret used on OpenVidu Server initialization */ constructor(urlOpenViduServer: string, secret: string); /** - * Creates an OpenVidu session. You can call [[Session.getSessionId]] in the resolved promise to retrieve the `sessionId` + * Creates an OpenVidu session. You can call [[Session.getSessionId]] inside the resolved promise to retrieve the `sessionId` * * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. */ @@ -60,6 +102,18 @@ export declare class OpenVidu { * - `409`: the recording has `started` status. Stop it before deletion */ deleteRecording(recordingId: string): Promise; + /** + * Updates every property of every active Session with the current status they have in OpenVidu Server. + * After calling this method you can access the updated array of active sessions in [[activeSessions]] + * + * @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not. + * This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client + */ + fetch(): Promise; private getBasicAuth; private setHostnameAndPort; + /** + * @hidden + */ + static getActiveSessions(): Session[]; } diff --git a/openvidu-node-client/lib/OpenVidu.js b/openvidu-node-client/lib/OpenVidu.js index 18c9fbe2..f85ec472 100644 --- a/openvidu-node-client/lib/OpenVidu.js +++ b/openvidu-node-client/lib/OpenVidu.js @@ -27,20 +27,37 @@ var OpenVidu = /** @class */ (function () { function OpenVidu(urlOpenViduServer, secret) { this.urlOpenViduServer = urlOpenViduServer; this.Buffer = require('buffer/').Buffer; + /** + * Array of active sessions. **This value will remain unchanged since the last time method [[OpenVidu.fetch]] + * was called**. Exceptions to this rule are: + * + * - Calling [[Session.fetch]] updates that specific Session status + * - Calling [[Session.close]] automatically removes the Session from the list of active Sessions + * - Calling [[Session.forceDisconnect]] automatically updates the inner affected connections for that specific Session + * - Calling [[Session.forceUnpublish]] also automatically updates the inner affected connections for that specific Session + * - Calling [[OpenVidu.startRecording]] and [[OpenVidu.stopRecording]] automatically updates the recording status of the + * Session ([[Session.recording]]) + * + * To get the array of active sessions with their current actual value, you must call [[OpenVidu.fetch]] before consulting + * property [[activeSessions]] + */ + this.activeSessions = []; this.setHostnameAndPort(); - this.basicAuth = this.getBasicAuth(secret); + OpenVidu.basicAuth = this.getBasicAuth(secret); + OpenVidu.o = this; } /** - * Creates an OpenVidu session. You can call [[Session.getSessionId]] in the resolved promise to retrieve the `sessionId` + * Creates an OpenVidu session. You can call [[Session.getSessionId]] inside the resolved promise to retrieve the `sessionId` * * @returns A Promise that is resolved to the [[Session]] if success and rejected with an Error object if not. */ OpenVidu.prototype.createSession = function (properties) { var _this = this; return new Promise(function (resolve, reject) { - var session = new Session_1.Session(_this.hostname, _this.port, _this.basicAuth, properties); + var session = new Session_1.Session(properties); session.getSessionIdHttp() .then(function (sessionId) { + _this.activeSessions.push(session); resolve(session); }) .catch(function (error) { @@ -53,6 +70,7 @@ var OpenVidu = /** @class */ (function () { * * @param sessionId The `sessionId` of the [[Session]] you want to start recording * @param name The name you want to give to the video file. You can access this same value in your clients on recording events (`recordingStarted`, `recordingStopped`) + * **WARNING: this parameter follows an overwriting policy.** If you name two recordings the same, the newest MP4 file will overwrite the oldest one * * @returns A Promise that is resolved to the [[Recording]] if it successfully started (the recording can be stopped with guarantees) and rejected with an Error object if not. This Error object has as `message` property with the following values: * - `404`: no session exists for the passed `sessionId` @@ -91,16 +109,24 @@ var OpenVidu = /** @class */ (function () { customLayout: '' }); } - axios_1.default.post('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START, data, { + axios_1.default.post('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_START, data, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu.basicAuth, 'Content-Type': 'application/json' } }) .then(function (res) { if (res.status === 200) { // SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording - resolve(new Recording_1.Recording(res.data)); + var r_1 = new Recording_1.Recording(res.data); + var activeSession = _this.activeSessions.find(function (s) { return s.sessionId === r_1.sessionId; }); + if (!!activeSession) { + activeSession.recording = true; + } + else { + console.warn("No active session found for sessionId '" + r_1.sessionId + "'. This instance of OpenVidu Node Client didn't create this session"); + } + resolve(r_1); } else { // ERROR response from openvidu-server. Resolve HTTP status @@ -136,16 +162,24 @@ var OpenVidu = /** @class */ (function () { OpenVidu.prototype.stopRecording = function (recordingId) { var _this = this; return new Promise(function (resolve, reject) { - axios_1.default.post('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId, undefined, { + axios_1.default.post('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + OpenVidu.API_RECORDINGS_STOP + '/' + recordingId, undefined, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu.basicAuth, 'Content-Type': 'application/x-www-form-urlencoded' } }) .then(function (res) { if (res.status === 200) { // SUCCESS response from openvidu-server (Recording in JSON format). Resolve new Recording - resolve(new Recording_1.Recording(res.data)); + var r_2 = new Recording_1.Recording(res.data); + var activeSession = _this.activeSessions.find(function (s) { return s.sessionId === r_2.sessionId; }); + if (!!activeSession) { + activeSession.recording = false; + } + else { + console.warn("No active session found for sessionId '" + r_2.sessionId + "'. This instance of OpenVidu Node Client didn't create this session"); + } + resolve(r_2); } else { // ERROR response from openvidu-server. Resolve HTTP status @@ -157,9 +191,8 @@ var OpenVidu = /** @class */ (function () { reject(new Error(error.response.status.toString())); } else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js + // The request was made but no response was received `error.request` is an instance of XMLHttpRequest + // in the browser and an instance of http.ClientRequest in node.js console.error(error.request); } else { @@ -178,11 +211,10 @@ var OpenVidu = /** @class */ (function () { * - `404`: no recording exists for the passed `recordingId` */ OpenVidu.prototype.getRecording = function (recordingId) { - var _this = this; return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { + axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu.basicAuth, 'Content-Type': 'application/x-www-form-urlencoded' } }) @@ -219,12 +251,10 @@ var OpenVidu = /** @class */ (function () { * @returns A Promise that is resolved to an array with all existing recordings */ OpenVidu.prototype.listRecordings = function () { - var _this = this; return new Promise(function (resolve, reject) { - axios_1.default.get('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS, { + axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS, { headers: { - 'Authorization': _this.basicAuth, - 'Content-Type': 'application/x-www-form-urlencoded' + Authorization: OpenVidu.basicAuth } }) .then(function (res) { @@ -270,11 +300,10 @@ var OpenVidu = /** @class */ (function () { * - `409`: the recording has `started` status. Stop it before deletion */ OpenVidu.prototype.deleteRecording = function (recordingId) { - var _this = this; return new Promise(function (resolve, reject) { - axios_1.default.delete('https://' + _this.hostname + ':' + _this.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { + axios_1.default.delete('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_RECORDINGS + '/' + recordingId, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu.basicAuth, 'Content-Type': 'application/x-www-form-urlencoded' } }) @@ -305,26 +334,123 @@ var OpenVidu = /** @class */ (function () { }); }); }; + /** + * Updates every property of every active Session with the current status they have in OpenVidu Server. + * After calling this method you can access the updated array of active sessions in [[activeSessions]] + * + * @returns A promise resolved to true if any Session status has changed with respect to the server, or to false if not. + * This applies to any property or sub-property of any of the sessions locally stored in OpenVidu Node Client + */ + OpenVidu.prototype.fetch = function () { + var _this = this; + return new Promise(function (resolve, reject) { + axios_1.default.get('https://' + OpenVidu.hostname + ':' + OpenVidu.port + OpenVidu.API_SESSIONS, { + headers: { + Authorization: OpenVidu.basicAuth + } + }) + .then(function (res) { + if (res.status === 200) { + // Array to store fetched sessionIds and later remove closed sessions + var fetchedSessionIds_1 = []; + // Boolean to store if any Session has changed + var hasChanged_1 = false; + res.data.content.forEach(function (session) { + fetchedSessionIds_1.push(session.sessionId); + var storedSession = _this.activeSessions.find(function (s) { return s.sessionId === session.sessionId; }); + if (!!storedSession) { + var beforeJSON = JSON.stringify(storedSession); + storedSession = storedSession.resetSessionWithJson(session); + var afterJSON = JSON.stringify(storedSession); + var changed = !(beforeJSON === afterJSON); + console.log("Available session '" + storedSession.sessionId + "' info fetched. Any change: " + changed); + hasChanged_1 = hasChanged_1 || changed; + } + else { + _this.activeSessions.push(new Session_1.Session(session)); + console.log("New session '" + session.sessionId + "' info fetched"); + hasChanged_1 = true; + } + }); + // Remove closed sessions from activeSessions array + _this.activeSessions = _this.activeSessions.filter(function (session) { + if (fetchedSessionIds_1.includes(session.sessionId)) { + return true; + } + else { + console.log("Removing closed session '" + session.sessionId + "'"); + hasChanged_1 = true; + return false; + } + }); + console.log('Active sessions info fetched: ', fetchedSessionIds_1); + resolve(hasChanged_1); + } + else { + // ERROR response from openvidu-server. Resolve HTTP status + reject(new Error(res.status.toString())); + } + }).catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code (not 2xx) + reject(new Error(error.response.status.toString())); + } + else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.error(error.request); + } + else { + // Something happened in setting up the request that triggered an Error + console.error('Error', error.message); + } + }); + }); + }; OpenVidu.prototype.getBasicAuth = function (secret) { return 'Basic ' + this.Buffer('OPENVIDUAPP:' + secret).toString('base64'); }; OpenVidu.prototype.setHostnameAndPort = function () { var urlSplitted = this.urlOpenViduServer.split(':'); if (urlSplitted.length === 3) { // URL has format: http:// + hostname + :port - this.hostname = this.urlOpenViduServer.split(':')[1].replace(/\//g, ''); - this.port = parseInt(this.urlOpenViduServer.split(':')[2].replace(/\//g, '')); + OpenVidu.hostname = this.urlOpenViduServer.split(':')[1].replace(/\//g, ''); + OpenVidu.port = parseInt(this.urlOpenViduServer.split(':')[2].replace(/\//g, '')); } else if (urlSplitted.length === 2) { // URL has format: hostname + :port - this.hostname = this.urlOpenViduServer.split(':')[0].replace(/\//g, ''); - this.port = parseInt(this.urlOpenViduServer.split(':')[1].replace(/\//g, '')); + OpenVidu.hostname = this.urlOpenViduServer.split(':')[0].replace(/\//g, ''); + OpenVidu.port = parseInt(this.urlOpenViduServer.split(':')[1].replace(/\//g, '')); } else { console.error("URL format incorrect: it must contain hostname and port (current value: '" + this.urlOpenViduServer + "')"); } }; + /** + * @hidden + */ + OpenVidu.getActiveSessions = function () { + return this.o.activeSessions; + }; + /** + * @hidden + */ OpenVidu.API_RECORDINGS = '/api/recordings'; + /** + * @hidden + */ OpenVidu.API_RECORDINGS_START = '/start'; + /** + * @hidden + */ OpenVidu.API_RECORDINGS_STOP = '/stop'; + /** + * @hidden + */ + OpenVidu.API_SESSIONS = '/api/sessions'; + /** + * @hidden + */ + OpenVidu.API_TOKENS = '/api/tokens'; return OpenVidu; }()); exports.OpenVidu = OpenVidu; diff --git a/openvidu-node-client/lib/OpenVidu.js.map b/openvidu-node-client/lib/OpenVidu.js.map index 2bf57b6b..25b4552a 100644 --- a/openvidu-node-client/lib/OpenVidu.js.map +++ b/openvidu-node-client/lib/OpenVidu.js.map @@ -1 +1 @@ -{"version":3,"file":"OpenVidu.js","sourceRoot":"","sources":["../src/OpenVidu.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,qCAAoC;AAEpC,yCAAwC;AAIxC,+BAAiE;AAEjE;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a,qBAAY,GAAG,eAAe,CAAC;IAC/C;;OAEG;IACa,mBAAU,GAAG,aAAa,CAAC;IA4a7C,eAAC;CAAA,AAhdD,IAgdC;AAhdY,4BAAQ"} \ No newline at end of file diff --git a/openvidu-node-client/lib/OpenViduRole.d.ts b/openvidu-node-client/lib/OpenViduRole.d.ts index 958f6b39..12a73fc3 100644 --- a/openvidu-node-client/lib/OpenViduRole.d.ts +++ b/openvidu-node-client/lib/OpenViduRole.d.ts @@ -1,3 +1,6 @@ +/** + * See [[TokenOptions.role]] + */ export declare enum OpenViduRole { /** * Can subscribe to published Streams of other users diff --git a/openvidu-node-client/lib/OpenViduRole.js b/openvidu-node-client/lib/OpenViduRole.js index bdfbd152..f66b4331 100644 --- a/openvidu-node-client/lib/OpenViduRole.js +++ b/openvidu-node-client/lib/OpenViduRole.js @@ -16,6 +16,9 @@ * */ Object.defineProperty(exports, "__esModule", { value: true }); +/** + * See [[TokenOptions.role]] + */ var OpenViduRole; (function (OpenViduRole) { /** diff --git a/openvidu-node-client/lib/OpenViduRole.js.map b/openvidu-node-client/lib/OpenViduRole.js.map index 75fa9547..e5760036 100644 --- a/openvidu-node-client/lib/OpenViduRole.js.map +++ b/openvidu-node-client/lib/OpenViduRole.js.map @@ -1 +1 @@ -{"version":3,"file":"OpenViduRole.js","sourceRoot":"","sources":["../src/OpenViduRole.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,IAAY,YAiBX;AAjBD,WAAY,YAAY;IAEpB;;OAEG;IACH,yCAAyB,CAAA;IAEzB;;OAEG;IACH,uCAAuB,CAAA;IAEvB;;;OAGG;IACH,uCAAuB,CAAA;AAC3B,CAAC,EAjBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAiBvB"} \ No newline at end of file +{"version":3,"file":"OpenViduRole.js","sourceRoot":"","sources":["../src/OpenViduRole.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;GAEG;AACH,IAAY,YAiBX;AAjBD,WAAY,YAAY;IAEpB;;OAEG;IACH,yCAAyB,CAAA;IAEzB;;OAEG;IACH,uCAAuB,CAAA;IAEvB;;;OAGG;IACH,uCAAuB,CAAA;AAC3B,CAAC,EAjBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAiBvB"} \ No newline at end of file diff --git a/openvidu-node-client/lib/Session.d.ts b/openvidu-node-client/lib/Session.d.ts index c1f28add..20e34ba8 100644 --- a/openvidu-node-client/lib/Session.d.ts +++ b/openvidu-node-client/lib/Session.d.ts @@ -1,15 +1,35 @@ +import { Connection } from './Connection'; +import { Publisher } from './Publisher'; import { SessionProperties } from './SessionProperties'; import { TokenOptions } from './TokenOptions'; export declare class Session { - private hostname; - private port; - private basicAuth; - private static readonly API_SESSIONS; - private static readonly API_TOKENS; + /** + * Unique identifier of the Session + */ sessionId: string; + /** + * Properties defining the session + */ properties: SessionProperties; - private Buffer; - constructor(hostname: string, port: number, basicAuth: string, properties?: SessionProperties); + /** + * Array of active connections to the session. This property always initialize as an empty array and + * **will remain unchanged since the last time method [[Session.fetch]] was called**. Exceptions to this rule are: + * + * - Calling [[Session.forceUnpublish]] also automatically updates each affected Connection status + * - Calling [[Session.forceDisconnect]] automatically updates each affected Connection status + * + * To get the array of active connections with their current actual value, you must call [[Session.fetch]] before consulting + * property [[activeConnections]] + */ + activeConnections: Connection[]; + /** + * Whether the session is being recorded or not + */ + recording: boolean; + /** + * @hidden + */ + constructor(propertiesOrJson?: any); /** * Gets the unique identifier of the Session */ @@ -20,8 +40,46 @@ export declare class Session { * @returns A Promise that is resolved to the _token_ if success and rejected with an Error object if not */ generateToken(tokenOptions?: TokenOptions): Promise; + /** + * Gracefully closes the Session: unpublishes all streams and evicts every participant + * + * @returns A Promise that is resolved if the session has been closed successfully and rejected with an Error object if not + */ + close(): Promise; + /** + * Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of active + * connections to the Session ([[Session.activeConnections]]) and use those values to call [[Session.forceDisconnect]] or [[Session.forceUnpublish]] + * + * @returns A promise resolved to true if the Session status has changed with respect to the server, or to false if not. + * This applies to any property or sub-property of the Session object + */ + fetch(): Promise; + /** + * Forces the user with Connection `connectionId` to leave the session. OpenVidu Browser will trigger the proper events on the client-side + * (`streamDestroyed`, `connectionDestroyed`, `sessionDisconnected`) with reason set to `"forceDisconnectByServer"` + * + * You can get `connection` parameter from [[Session.activeConnections]] array ([[Connection.connectionId]] for getting each `connectionId` property). + * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server + * + * @returns A Promise that is resolved if the user was successfully disconnected and rejected with an Error object if not + */ + forceDisconnect(connection: string | Connection): Promise; + /** + * Forces some user to unpublish a Stream (identified by its `streamId` or the corresponding [[Publisher]] object owning it). + * OpenVidu Browser will trigger the proper events on the client-side (`streamDestroyed`) with reason set to `"forceUnpublishByServer"`. + * + * You can get `publisher` parameter from [[Connection.publishers]] array ([[Publisher.streamId]] for getting each `streamId` property). + * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server + * + * @returns A Promise that is resolved if the stream was successfully unpublished and rejected with an Error object if not + */ + forceUnpublish(publisher: string | Publisher): Promise; /** * @hidden */ getSessionIdHttp(): Promise; + /** + * @hidden + */ + resetSessionWithJson(json: any): Session; } diff --git a/openvidu-node-client/lib/Session.js b/openvidu-node-client/lib/Session.js index 6a67944f..fa3ba126 100644 --- a/openvidu-node-client/lib/Session.js +++ b/openvidu-node-client/lib/Session.js @@ -16,23 +16,52 @@ * */ Object.defineProperty(exports, "__esModule", { value: true }); +var Connection_1 = require("./Connection"); var MediaMode_1 = require("./MediaMode"); +var OpenVidu_1 = require("./OpenVidu"); var OpenViduRole_1 = require("./OpenViduRole"); +var Publisher_1 = require("./Publisher"); var RecordingLayout_1 = require("./RecordingLayout"); var RecordingMode_1 = require("./RecordingMode"); var axios_1 = require("axios"); var Session = /** @class */ (function () { - function Session(hostname, port, basicAuth, properties) { - this.hostname = hostname; - this.port = port; - this.basicAuth = basicAuth; - this.Buffer = require('buffer/').Buffer; - if (!properties) { - this.properties = {}; + /** + * @hidden + */ + function Session(propertiesOrJson) { + /** + * Array of active connections to the session. This property always initialize as an empty array and + * **will remain unchanged since the last time method [[Session.fetch]] was called**. Exceptions to this rule are: + * + * - Calling [[Session.forceUnpublish]] also automatically updates each affected Connection status + * - Calling [[Session.forceDisconnect]] automatically updates each affected Connection status + * + * To get the array of active connections with their current actual value, you must call [[Session.fetch]] before consulting + * property [[activeConnections]] + */ + this.activeConnections = []; + /** + * Whether the session is being recorded or not + */ + this.recording = false; + if (!!propertiesOrJson) { + // Defined parameter + if (!!propertiesOrJson.sessionId) { + // Parameter is a JSON representation of Session ('sessionId' property always defined) + this.resetSessionWithJson(propertiesOrJson); + } + else { + // Parameter is a SessionProperties object + this.properties = propertiesOrJson; + } } else { - this.properties = properties; + // Empty parameter + this.properties = {}; } + this.properties.mediaMode = !!this.properties.mediaMode ? this.properties.mediaMode : MediaMode_1.MediaMode.ROUTED; + this.properties.recordingMode = !!this.properties.recordingMode ? this.properties.recordingMode : RecordingMode_1.RecordingMode.MANUAL; + this.properties.defaultRecordingLayout = !!this.properties.defaultRecordingLayout ? this.properties.defaultRecordingLayout : RecordingLayout_1.RecordingLayout.BEST_FIT; } /** * Gets the unique identifier of the Session @@ -53,9 +82,9 @@ var Session = /** @class */ (function () { role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole_1.OpenViduRole.PUBLISHER, data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : '' }); - axios_1.default.post('https://' + _this.hostname + ':' + _this.port + Session.API_TOKENS, data, { + axios_1.default.post('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_TOKENS, data, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, 'Content-Type': 'application/json' } }) @@ -86,6 +115,220 @@ var Session = /** @class */ (function () { }); }); }; + /** + * Gracefully closes the Session: unpublishes all streams and evicts every participant + * + * @returns A Promise that is resolved if the session has been closed successfully and rejected with an Error object if not + */ + Session.prototype.close = function () { + var _this = this; + return new Promise(function (resolve, reject) { + axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId, { + headers: { + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) + .then(function (res) { + if (res.status === 204) { + // SUCCESS response from openvidu-server + var indexToRemove = OpenVidu_1.OpenVidu.getActiveSessions().findIndex(function (s) { return s.sessionId === _this.sessionId; }); + OpenVidu_1.OpenVidu.getActiveSessions().splice(indexToRemove, 1); + resolve(); + } + else { + // ERROR response from openvidu-server. Resolve HTTP status + reject(new Error(res.status.toString())); + } + }).catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code (not 2xx) + reject(new Error(error.response.status.toString())); + } + else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.error(error.request); + } + else { + // Something happened in setting up the request that triggered an Error + console.error('Error', error.message); + } + }); + }); + }; + /** + * Updates every property of the Session with the current status it has in OpenVidu Server. This is especially useful for accessing the list of active + * connections to the Session ([[Session.activeConnections]]) and use those values to call [[Session.forceDisconnect]] or [[Session.forceUnpublish]] + * + * @returns A promise resolved to true if the Session status has changed with respect to the server, or to false if not. + * This applies to any property or sub-property of the Session object + */ + Session.prototype.fetch = function () { + var _this = this; + return new Promise(function (resolve, reject) { + var beforeJSON = JSON.stringify(_this); + axios_1.default.get('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId, { + headers: { + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) + .then(function (res) { + if (res.status === 200) { + // SUCCESS response from openvidu-server + _this.resetSessionWithJson(res.data); + var afterJSON = JSON.stringify(_this); + var hasChanged = !(beforeJSON === afterJSON); + console.log("Session info fetched for session '" + _this.sessionId + "'. Any change: " + hasChanged); + resolve(hasChanged); + } + else { + // ERROR response from openvidu-server. Resolve HTTP status + reject(new Error(res.status.toString())); + } + }).catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code (not 2xx) + reject(new Error(error.response.status.toString())); + } + else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.error(error.request); + } + else { + // Something happened in setting up the request that triggered an Error + console.error('Error', error.message); + } + }); + }); + }; + /** + * Forces the user with Connection `connectionId` to leave the session. OpenVidu Browser will trigger the proper events on the client-side + * (`streamDestroyed`, `connectionDestroyed`, `sessionDisconnected`) with reason set to `"forceDisconnectByServer"` + * + * You can get `connection` parameter from [[Session.activeConnections]] array ([[Connection.connectionId]] for getting each `connectionId` property). + * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server + * + * @returns A Promise that is resolved if the user was successfully disconnected and rejected with an Error object if not + */ + Session.prototype.forceDisconnect = function (connection) { + var _this = this; + return new Promise(function (resolve, reject) { + var connectionId = typeof connection === 'string' ? connection : connection.connectionId; + axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId + '/connection/' + connectionId, { + headers: { + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) + .then(function (res) { + if (res.status === 204) { + // SUCCESS response from openvidu-server + // Remove connection from activeConnections array + var connectionClosed_1; + _this.activeConnections = _this.activeConnections.filter(function (con) { + if (con.connectionId !== connectionId) { + return true; + } + else { + connectionClosed_1 = con; + return false; + } + }); + // Remove every Publisher of the closed connection from every subscriber list of other connections + if (!!connectionClosed_1) { + connectionClosed_1.publishers.forEach(function (publisher) { + _this.activeConnections.forEach(function (con) { + con.subscribers = con.subscribers.filter(function (subscriber) { return subscriber !== publisher.streamId; }); + }); + }); + } + else { + console.warn("The closed connection wasn't fetched in OpenVidu Java Client. No changes in the collection of active connections of the Session"); + } + console.log("Connection '" + connectionId + "' closed"); + resolve(); + } + else { + // ERROR response from openvidu-server. Resolve HTTP status + reject(new Error(res.status.toString())); + } + }) + .catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code (not 2xx) + reject(new Error(error.response.status.toString())); + } + else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.error(error.request); + } + else { + // Something happened in setting up the request that triggered an Error + console.error('Error', error.message); + } + }); + }); + }; + /** + * Forces some user to unpublish a Stream (identified by its `streamId` or the corresponding [[Publisher]] object owning it). + * OpenVidu Browser will trigger the proper events on the client-side (`streamDestroyed`) with reason set to `"forceUnpublishByServer"`. + * + * You can get `publisher` parameter from [[Connection.publishers]] array ([[Publisher.streamId]] for getting each `streamId` property). + * Remember to call [[Session.fetch]] before to fetch the current actual properties of the Session from OpenVidu Server + * + * @returns A Promise that is resolved if the stream was successfully unpublished and rejected with an Error object if not + */ + Session.prototype.forceUnpublish = function (publisher) { + var _this = this; + return new Promise(function (resolve, reject) { + var streamId = typeof publisher === 'string' ? publisher : publisher.streamId; + axios_1.default.delete('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS + '/' + _this.sessionId + '/stream/' + streamId, { + headers: { + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) + .then(function (res) { + if (res.status === 204) { + // SUCCESS response from openvidu-server + _this.activeConnections.forEach(function (connection) { + // Try to remove the Publisher from the Connection publishers collection + connection.publishers = connection.publishers.filter(function (pub) { return pub.streamId !== streamId; }); + // Try to remove the Publisher from the Connection subscribers collection + connection.subscribers = connection.subscribers.filter(function (sub) { return sub !== streamId; }); + }); + console.log("Stream '" + streamId + "' unpublished"); + resolve(); + } + else { + // ERROR response from openvidu-server. Resolve HTTP status + reject(new Error(res.status.toString())); + } + }).catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code (not 2xx) + reject(new Error(error.response.status.toString())); + } + else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.error(error.request); + } + else { + // Something happened in setting up the request that triggered an Error + console.error('Error', error.message); + } + }); + }); + }; /** * @hidden */ @@ -102,9 +345,9 @@ var Session = /** @class */ (function () { defaultCustomLayout: !!_this.properties.defaultCustomLayout ? _this.properties.defaultCustomLayout : '', customSessionId: !!_this.properties.customSessionId ? _this.properties.customSessionId : '' }); - axios_1.default.post('https://' + _this.hostname + ':' + _this.port + Session.API_SESSIONS, data, { + axios_1.default.post('https://' + OpenVidu_1.OpenVidu.hostname + ':' + OpenVidu_1.OpenVidu.port + OpenVidu_1.OpenVidu.API_SESSIONS, data, { headers: { - 'Authorization': _this.basicAuth, + 'Authorization': OpenVidu_1.OpenVidu.basicAuth, 'Content-Type': 'application/json' } }) @@ -143,8 +386,44 @@ var Session = /** @class */ (function () { }); }); }; - Session.API_SESSIONS = '/api/sessions'; - Session.API_TOKENS = '/api/tokens'; + /** + * @hidden + */ + Session.prototype.resetSessionWithJson = function (json) { + var _this = this; + this.sessionId = json.sessionId; + this.recording = json.recording; + var customSessionId; + var defaultCustomLayout; + if (!!this.properties) { + customSessionId = this.properties.customSessionId; + defaultCustomLayout = !!json.defaultCustomLayout ? json.defaultCustomLayout : this.properties.defaultCustomLayout; + } + this.properties = { + mediaMode: json.mediaMode, + recordingMode: json.recordingMode, + defaultRecordingLayout: json.defaultRecordingLayout + }; + if (!!customSessionId) { + this.properties.customSessionId = customSessionId; + } + if (!!defaultCustomLayout) { + this.properties.defaultCustomLayout = defaultCustomLayout; + } + this.activeConnections = []; + json.connections.content.forEach(function (connection) { + var publishers = []; + connection.publishers.forEach(function (publisher) { + publishers.push(new Publisher_1.Publisher(publisher)); + }); + var subscribers = []; + connection.subscribers.forEach(function (subscriber) { + subscribers.push(subscriber.streamId); + }); + _this.activeConnections.push(new Connection_1.Connection(connection.connectionId, connection.role, connection.token, connection.serverData, connection.clientData, publishers, subscribers)); + }); + return this; + }; return Session; }()); exports.Session = Session; diff --git a/openvidu-node-client/lib/Session.js.map b/openvidu-node-client/lib/Session.js.map index 7793d324..97835e8e 100644 --- a/openvidu-node-client/lib/Session.js.map +++ b/openvidu-node-client/lib/Session.js.map @@ -1 +1 @@ -{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH,yCAAwC;AACxC,+CAA8C;AAC9C,qDAAoD;AACpD,iDAAgD;AAIhD,+BAAiE;AAEjE;IAUI,iBAAoB,QAAgB,EAAU,IAAY,EAAU,SAAiB,EAAE,UAA8B;QAAjG,aAAQ,GAAR,QAAQ,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAQ;QAAU,cAAS,GAAT,SAAS,CAAQ;QAF7E,WAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QAGvC,IAAI,CAAC,UAAU,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;SACxB;aAAM;YACH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;IACL,CAAC;IAED;;OAEG;IACI,8BAAY,GAAnB;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,+BAAa,GAApB,UAAqB,YAA2B;QAAhD,iBA0CC;QAzCG,OAAO,IAAI,OAAO,CAAS,UAAC,OAAO,EAAE,MAAM;YAEvC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;gBACxB,OAAO,EAAE,KAAI,CAAC,SAAS;gBACvB,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C,IAAI,CAAC,IAAI,uBAAU,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;QACnL,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAEL,cAAC;AAAD,CAAC,AAjaD,IAiaC;AAjaY,0BAAO"} \ No newline at end of file diff --git a/openvidu-node-client/lib/TokenOptions.d.ts b/openvidu-node-client/lib/TokenOptions.d.ts index 396d7274..c008181b 100644 --- a/openvidu-node-client/lib/TokenOptions.d.ts +++ b/openvidu-node-client/lib/TokenOptions.d.ts @@ -1,4 +1,7 @@ import { OpenViduRole } from './OpenViduRole'; +/** + * See [[Session.generateToken]] + */ export interface TokenOptions { /** * Secure (server-side) data associated to this token. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object. diff --git a/openvidu-node-client/lib/index.d.ts b/openvidu-node-client/lib/index.d.ts index 4c5b7166..ae9a4981 100644 --- a/openvidu-node-client/lib/index.d.ts +++ b/openvidu-node-client/lib/index.d.ts @@ -8,3 +8,5 @@ export * from './RecordingLayout'; export * from './RecordingMode'; export * from './Recording'; export * from './RecordingProperties'; +export * from './Connection'; +export * from './Publisher'; diff --git a/openvidu-node-client/lib/index.js b/openvidu-node-client/lib/index.js index 79232b2e..6bab7269 100644 --- a/openvidu-node-client/lib/index.js +++ b/openvidu-node-client/lib/index.js @@ -10,4 +10,6 @@ __export(require("./MediaMode")); __export(require("./RecordingLayout")); __export(require("./RecordingMode")); __export(require("./Recording")); +__export(require("./Connection")); +__export(require("./Publisher")); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/openvidu-node-client/lib/index.js.map b/openvidu-node-client/lib/index.js.map index 98aad725..1f92ba4d 100644 --- a/openvidu-node-client/lib/index.js.map +++ b/openvidu-node-client/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,gCAA2B;AAC3B,oCAA+B;AAC/B,+BAA0B;AAG1B,iCAA4B;AAC5B,uCAAkC;AAClC,qCAAgC;AAChC,iCAA4B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,gCAA2B;AAC3B,oCAA+B;AAC/B,+BAA0B;AAG1B,iCAA4B;AAC5B,uCAAkC;AAClC,qCAAgC;AAChC,iCAA4B;AAE5B,kCAA6B;AAC7B,iCAA4B"} \ No newline at end of file