Skip to content

Commit 42b3749

Browse files
committed
Rename 'mediaType' by 'mediaTypes'
1 parent 528d989 commit 42b3749

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/MediaSession.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ JsSIP.MediaSession.prototype = {
2727
* <br> -- If the user consents, create a peerConnection.
2828
* <br> -- If the user doesn't consent, fire onFailure callback.
2929
*
30-
* @param {Object} mediaType {audio:true/false, video:true/false}
30+
* @param {Object} mediaTypes {audio:true/false, video:true/false}
3131
* @param {Function} onSuccess
3232
* @param {Function} onFailure
3333
*/
34-
startCaller: function(mediaType, onSuccess, onFailure) {
34+
startCaller: function(mediaTypes, onSuccess, onFailure) {
3535
var self = this;
3636

3737
/** @private */
@@ -53,7 +53,7 @@ JsSIP.MediaSession.prototype = {
5353
onFailure(e);
5454
}
5555

56-
this.getUserMedia(mediaType, onGetUserMediaSuccess, onGetUserMediaFailure);
56+
this.getUserMedia(mediaTypes, onGetUserMediaSuccess, onGetUserMediaFailure);
5757
},
5858

5959
/**
@@ -177,11 +177,11 @@ JsSIP.MediaSession.prototype = {
177177
},
178178

179179
/**
180-
* @param {Object} mediaType
180+
* @param {Object} mediaTypes
181181
* @param {Function} onSuccess
182182
* @param {Function} onFailure
183183
*/
184-
getUserMedia: function(mediaType, onSuccess, onFailure) {
184+
getUserMedia: function(mediaTypes, onSuccess, onFailure) {
185185
var self = this;
186186

187187
function getSuccess(stream) {
@@ -204,7 +204,7 @@ JsSIP.MediaSession.prototype = {
204204

205205
// Get User Media
206206
console.log(JsSIP.C.LOG_MEDIA_SESSION +"Requesting access to local media.");
207-
navigator.webkitGetUserMedia(mediaType, getSuccess, getFailure);
207+
navigator.webkitGetUserMedia(mediaTypes, getSuccess, getFailure);
208208

209209
},
210210

src/Session.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ JsSIP.Session.prototype.init_incoming = function(request) {
7474
};
7575

7676
JsSIP.Session.prototype.connect = function(target, views, options) {
77-
var event, eventHandlers, request, selfView, remoteView, mediaType, extraHeaders, requestParams;
77+
var event, eventHandlers, request, selfView, remoteView, mediaTypes, extraHeaders, requestParams;
7878

7979
// Check UA Status
8080
JsSIP.Utils.checkUAStatus(this.ua);
@@ -100,7 +100,7 @@ JsSIP.Session.prototype.connect = function(target, views, options) {
100100
options = options || {};
101101
selfView = views.selfView || null;
102102
remoteView = views.remoteView || null;
103-
mediaType = options.mediaType || {audio: true, video: true};
103+
mediaTypes = options.mediaTypes || {audio: true, video: true};
104104
extraHeaders = options.extraHeaders || [];
105105
eventHandlers = options.eventHandlers || {};
106106

@@ -155,7 +155,7 @@ JsSIP.Session.prototype.connect = function(target, views, options) {
155155

156156
this.newSession('local', request, target);
157157
this.connecting('local', request, target);
158-
this.sendInitialRequest(mediaType);
158+
this.sendInitialRequest(mediaTypes);
159159
};
160160

161161
/**
@@ -1003,7 +1003,7 @@ JsSIP.Session.prototype.sendDTMF = function(tones, options) {
10031003
/**
10041004
* @private
10051005
*/
1006-
JsSIP.Session.prototype.sendInitialRequest = function(mediaType) {
1006+
JsSIP.Session.prototype.sendInitialRequest = function(mediaTypes) {
10071007
var
10081008
self = this,
10091009
request_sender = new JsSIP.RequestSender(self, this.ua);
@@ -1019,7 +1019,7 @@ JsSIP.Session.prototype.sendInitialRequest = function(mediaType) {
10191019

10201020
// Hack to quit m=video section from sdp defined in http://code.google.com/p/webrtc/issues/detail?id=935
10211021
// To be deleted when the fix arrives to chrome stable version
1022-
if (!mediaType.video) {
1022+
if (!mediaTypes.video) {
10231023
if (self.request.body.indexOf('m=video') !== -1){
10241024
self.request.body = self.request.body.substring(0, self.request.body.indexOf('m=video'));
10251025
}
@@ -1038,7 +1038,7 @@ JsSIP.Session.prototype.sendInitialRequest = function(mediaType) {
10381038
}
10391039
}
10401040

1041-
self.mediaSession.startCaller(mediaType, onMediaSuccess, onMediaFailure);
1041+
self.mediaSession.startCaller(mediaTypes, onMediaSuccess, onMediaFailure);
10421042
};
10431043

10441044

0 commit comments

Comments
 (0)