diff --git a/src/js/common_shim.js b/src/js/common_shim.js index e6df610d..7e7b5657 100644 --- a/src/js/common_shim.js +++ b/src/js/common_shim.js @@ -25,7 +25,7 @@ export function shimRTCIceCandidate(window) { if (typeof args === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) { args = JSON.parse(JSON.stringify(args)); - args.candidate = args.candidate.substr(2); + args.candidate = args.candidate.substring(2); } if (args.candidate && args.candidate.length) { @@ -173,7 +173,7 @@ export function shimMaxMessageSize(window, browserDetails) { const match = SDPUtils.matchPrefix(description.sdp, 'a=max-message-size:'); if (match.length > 0) { - maxMessageSize = parseInt(match[0].substr(19), 10); + maxMessageSize = parseInt(match[0].substring(19), 10); } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) { // If the maximum message size is not present in the remote SDP and