|
|
@@ -1397,7 +1397,7 @@ JitsiLocalTrack.prototype.stop = function () {
|
|
1397
|
1397
|
if(!this.stream)
|
|
1398
|
1398
|
return;
|
|
1399
|
1399
|
if(this.rtc)
|
|
1400
|
|
- this.rtc.room.removeStream(this.stream);
|
|
|
1400
|
+ this.rtc.room.removeStream(this.stream, function () {});
|
|
1401
|
1401
|
RTC.stopMediaStream(this.stream);
|
|
1402
|
1402
|
this.detach();
|
|
1403
|
1403
|
}
|
|
|
@@ -1547,9 +1547,18 @@ function implementOnEndedHandling(jitsiTrack) {
|
|
1547
|
1547
|
function addMediaStreamInactiveHandler(mediaStream, handler) {
|
|
1548
|
1548
|
if(RTCBrowserType.isTemasysPluginUsed()) {
|
|
1549
|
1549
|
// themasys
|
|
1550
|
|
- mediaStream.attachEvent('ended', function () {
|
|
1551
|
|
- handler(mediaStream);
|
|
1552
|
|
- });
|
|
|
1550
|
+ //FIXME: Seems that not working properly.
|
|
|
1551
|
+ if(mediaStream.onended) {
|
|
|
1552
|
+ mediaStream.onended = handler;
|
|
|
1553
|
+ } else if(mediaStream.addEventListener) {
|
|
|
1554
|
+ mediaStream.addEventListener('ended', function () {
|
|
|
1555
|
+ handler(mediaStream);
|
|
|
1556
|
+ });
|
|
|
1557
|
+ } else if(mediaStream.attachEvent) {
|
|
|
1558
|
+ mediaStream.attachEvent('ended', function () {
|
|
|
1559
|
+ handler(mediaStream);
|
|
|
1560
|
+ });
|
|
|
1561
|
+ }
|
|
1553
|
1562
|
}
|
|
1554
|
1563
|
else {
|
|
1555
|
1564
|
if(typeof mediaStream.active !== "undefined")
|