new_jsep_session_description: session-version doesn't follow the spec
vsotog opened this issue · comments
vsotog commented
Current implementation:
session_version: SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap_or_else(|_| Duration::from_secs(0))
.subsec_nanos() as u64
Spec:
https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-26#section-5.2.2
5.2.2. Subsequent Offers
o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment by one on each call
to createOffer if the offer might differ from the output of the
previous call to createOffer; implementations MAY opt to increment
<session-version> on every call. The value of the generated
<session-version> is independent of the <session-version> of the
current local description; in particular, in the case where the
current version is N, an offer is created and applied with version
N+1, and then that offer is rolled back so that the current
version is again N, the next generated offer will still have
version N+2.
MUST increment by one on each call to createOffer
https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-26#section-5.3.2
5.3.2. Subsequent Answers
o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment if the session
description changes in any way from the previously generated
answer.
Related to: https://github.com/pion/sdp/issues/60