Bug 1607781 Comment 37 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Saeed Jahed from comment #36)
> Yes. I am tracking it on our side.
> 
> What is Firefox's recommended way of feature-detecting this change? The old SDP parser allowed:
> a=simulcast: send rid=foo;bar
> 
> While, the new one (I think post Firefox 68), only allowed:
> a=simulcast:send foo;bar
> 
> We can feature detect by using the old format and seeing if it throws an error. But there are other reasons where applying SDPs might throw an error and so it's probably not great to feature-detect that way.

   There are a few ways you could do this.

   You could have two simple SDPs that are identical except for the simulcast format; if the new one works, then use the new format. If the new one doesn't, try the old one. If that works, then use the old format. If the old one fails too, that almost certainly means that you're working on a newer Firefox that has implemented some sort of new validity checking, so you should report this case, and try using the new format.

   If all else fails, you could inspect our o= line, which has had the version in it for a really long time. That could be used to reliably detect old Firefox.

> At this point, I'm considering just using the new format regardless of Firefox version, as the usage of older versions of Firefox that required older SDP is probably very low.

   This would probably be fine too.
(In reply to Saeed Jahed from comment #36)
> Yes. I am tracking it on our side.
> 
> What is Firefox's recommended way of feature-detecting this change? The old SDP parser allowed:
> a=simulcast: send rid=foo;bar
> 
> While, the new one (I think post Firefox 68), only allowed:
> a=simulcast:send foo;bar
> 
> We can feature detect by using the old format and seeing if it throws an error. But there are other reasons where applying SDPs might throw an error and so it's probably not great to feature-detect that way.

   There are a few ways you could do this.

   You could have two simple SDPs that are identical except for the simulcast format; if the new one works, then use the new format. If the new one doesn't, try the old one. If that works, then use the old format. If the old one fails too, that probably means you're on a newer Firefox; either sRD is just broken for some crazy reason, and this is likely newer Firefox because that's the baseline, or you have a newer Firefox that is implementing some new validity checking that your SDP is failing, so you should use the new format. It might also be because you're using Firefox that doesn't support simulcast at all, which means using the new format won't be any worse than using the old.

   If all else fails, you could inspect our o= line, which has had the version in it for a really long time. That could be used to reliably detect old Firefox.

> At this point, I'm considering just using the new format regardless of Firefox version, as the usage of older versions of Firefox that required older SDP is probably very low.

   This would probably be fine too.

Back to Bug 1607781 Comment 37