OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> | 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> |
4 <script type="text/javascript" src="webrtc_test_audio.js"></script> | 4 <script type="text/javascript" src="webrtc_test_audio.js"></script> |
5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
6 $ = function(id) { | 6 $ = function(id) { |
7 return document.getElementById(id); | 7 return document.getElementById(id); |
8 }; | 8 }; |
9 | 9 |
10 var gFirstConnection = null; | 10 var gFirstConnection = null; |
11 var gSecondConnection = null; | 11 var gSecondConnection = null; |
12 var gTestWithoutMsid = false; | 12 var gTestWithoutMsid = false; |
13 var gLocalStream = null; | 13 var gLocalStream = null; |
14 var gSentTones = ''; | 14 var gSentTones = ''; |
15 | 15 |
16 var gRemoteStreams = {}; | 16 var gRemoteStreams = {}; |
17 | 17 |
18 // Default transform functions, overridden by some test cases. | 18 // Default transform functions, overridden by some test cases. |
19 var transformSdp = function(sdp) { return sdp; }; | 19 var transformSdp = function(sdp) { return sdp; }; |
20 var transformRemoteSdp = function(sdp) { return sdp; }; | 20 var transformRemoteSdp = function(sdp) { return sdp; }; |
21 var transformCandidate = function(candidate) { return candidate; }; | 21 var transformCandidate = function(candidate) { return candidate; }; |
22 var onLocalDescriptionError = function(error) { }; | 22 var onLocalDescriptionError = function(error) { }; |
23 | 23 |
24 // Temporary measure to be able to force iSAC 16K where needed, particularly | 24 // Temporary measure to be able to force iSAC 16K where needed, particularly |
25 // on Android. This applies to every test which is why it's implemented like | 25 // on Android. This applies to every test which is why it's implemented like |
26 // this. | 26 // this. |
27 var maybeForceIsac16K = function(sdp) { return sdp; }; | 27 var maybeForceIsac16K = function(sdp) { return sdp; }; |
28 function forceIsac16KInSdp() { | 28 function forceIsac16KInSdp() { |
29 maybeForceIsac16K = function(sdp) { | 29 maybeForceIsac16K = function(sdp) { |
30 // Remove all other codecs (not the video codecs though). | 30 // Remove all other codecs (not the video codecs though). Also leave |
| 31 // 126 for DTMF. |
31 sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g, | 32 sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g, |
32 'm=audio $1 RTP/SAVPF 103\r\n'); | 33 'm=audio $1 RTP/SAVPF 103 126\r\n'); |
33 sdp = sdp.replace('a=fmtp:111 minptime=10', 'a=fmtp:103 minptime=10'); | 34 sdp = sdp.replace('a=fmtp:111 minptime=10', 'a=fmtp:103 minptime=10'); |
34 sdp = sdp.replace(/a=rtpmap:(?!103)\d{1,3} (?!X?VP8|red|ulpfec).*\r\n/g, | 35 sdp = sdp.replace( |
35 ''); | 36 /a=rtpmap:(?!(103|126))\d{1,3} (?!X?VP8|red|ulpfec).*\r\n/g, |
| 37 ''); |
36 return sdp; | 38 return sdp; |
37 }; | 39 }; |
38 } | 40 } |
39 | 41 |
40 // When using external SDES, the crypto key is chosen by javascript. | 42 // When using external SDES, the crypto key is chosen by javascript. |
41 var EXTERNAL_SDES_LINES = { | 43 var EXTERNAL_SDES_LINES = { |
42 'audio': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + | 44 'audio': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + |
43 'inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR', | 45 'inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR', |
44 'video': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + | 46 'video': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + |
45 'inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj', | 47 'inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj', |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 781 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
780 style="display:none"></canvas></td> | 782 style="display:none"></canvas></td> |
781 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 783 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
782 style="display:none"></canvas></td> | 784 style="display:none"></canvas></td> |
783 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 785 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
784 style="display:none"></canvas></td> | 786 style="display:none"></canvas></td> |
785 </tr> | 787 </tr> |
786 </table> | 788 </table> |
787 </body> | 789 </body> |
788 </html> | 790 </html> |
OLD | NEW |