|
|
@@ -89,6 +89,20 @@ RTC.prototype.onIncommingCall = function(event) {
|
|
89
|
89
|
this.eventEmitter);
|
|
90
|
90
|
};
|
|
91
|
91
|
|
|
|
92
|
+/**
|
|
|
93
|
+ * Should be called when current media session ends and after the PeerConnection
|
|
|
94
|
+ * has been closed using PeerConnection.close() method.
|
|
|
95
|
+ */
|
|
|
96
|
+RTC.prototype.onCallEnded = function() {
|
|
|
97
|
+ if (this.dataChannels) {
|
|
|
98
|
+ // DataChannels are not explicitly closed as the PeerConnection
|
|
|
99
|
+ // is closed on call ended which triggers data channel onclose events.
|
|
|
100
|
+ // The reference is cleared to disable any logic related to the data
|
|
|
101
|
+ // channels.
|
|
|
102
|
+ this.dataChannels = null;
|
|
|
103
|
+ }
|
|
|
104
|
+};
|
|
|
105
|
+
|
|
92
|
106
|
/**
|
|
93
|
107
|
* Elects the participant with the given id to be the pinned participant in
|
|
94
|
108
|
* order to always receive video for this participant (even when last n is
|