diff --git a/lib/grammar.js b/lib/grammar.js index 5a20da9..33616b2 100644 --- a/lib/grammar.js +++ b/lib/grammar.js @@ -243,9 +243,9 @@ var grammar = module.exports = { format: 'remote-candidates:%s' }, { - // a=ice-options:google-ice + // a=ice-options:trickle ice2 name: 'iceOptions', - reg: /^ice-options:(\S*)/, + reg: /^ice-options:(.*)/, format: 'ice-options:%s' }, { diff --git a/test/jsep.sdp b/test/jsep.sdp index 7dbcfe5..3a4ee4c 100644 --- a/test/jsep.sdp +++ b/test/jsep.sdp @@ -18,7 +18,7 @@ a=rtpmap:98 telephone-event/48000 a=maxptime:120 a=ice-ufrag:ETEn1v9DoTMB9J4r a=ice-pwd:OtSK0WpNtpUjkY4+86js7ZQl -a=ice-options:trickle +a=ice-options:trickle ice2 a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 a=setup:actpass a=rtcp-mux diff --git a/test/parse.test.js b/test/parse.test.js index 8b21f48..94a2cd4 100644 --- a/test/parse.test.js +++ b/test/parse.test.js @@ -355,6 +355,9 @@ test('jsepSdp', function *(t) { var media = session.media; t.ok(media && media.length === 2, 'got media'); + t.equal(media[0].iceOptions, 'trickle ice2', 'multiple ice options'); + t.equal(media[1].iceOptions, 'trickle', 'single ice option'); + var video = media[1]; t.equal(video.ssrcGroups.length, 1, '1 ssrc grouping'); t.deepEqual(video.ssrcGroups[0],