Re: [rtcweb] Rejecting MediaStreamTracks in JSEP

Christer Holmberg <christer.holmberg@ericsson.com> Mon, 03 February 2014 20:08 UTC

Return-Path: <christer.holmberg@ericsson.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BD5641A0242 for <rtcweb@ietfa.amsl.com>; Mon, 3 Feb 2014 12:08:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.45
X-Spam-Level:
X-Spam-Status: No, score=-1.45 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_SE=0.35, HTML_MESSAGE=0.001, J_CHICKENPOX_14=0.6, J_CHICKENPOX_15=0.6, J_CHICKENPOX_18=0.6, J_CHICKENPOX_36=0.6, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ElzlGBw1kBwW for <rtcweb@ietfa.amsl.com>; Mon, 3 Feb 2014 12:08:37 -0800 (PST)
Received: from mailgw1.ericsson.se (mailgw1.ericsson.se [193.180.251.45]) by ietfa.amsl.com (Postfix) with ESMTP id 295301A01E1 for <rtcweb@ietf.org>; Mon, 3 Feb 2014 12:08:36 -0800 (PST)
X-AuditID: c1b4fb2d-b7f5d8e000002a7b-d3-52eff7441b52
Received: from ESESSHC003.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw1.ericsson.se (Symantec Mail Security) with SMTP id 22.02.10875.447FFE25; Mon, 3 Feb 2014 21:08:36 +0100 (CET)
Received: from ESESSMB209.ericsson.se ([169.254.9.99]) by ESESSHC003.ericsson.se ([153.88.183.27]) with mapi id 14.02.0387.000; Mon, 3 Feb 2014 21:08:35 +0100
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Justin Uberti <juberti@google.com>, "rtcweb@ietf.org" <rtcweb@ietf.org>, Cullen Jennings <fluffy@cisco.com>
Thread-Topic: [rtcweb] Rejecting MediaStreamTracks in JSEP
Thread-Index: AQHPIRX+Di2Spk3Lw0GdFyTxI3EbsJqj9URm
Date: Mon, 03 Feb 2014 20:08:35 +0000
Message-ID: <37s61e9ckw02929t4v3gflwo.1391458112947@email.android.com>
References: <CAOJ7v-22T7hLMdC2je0nLk34MXQ8L+JFWLtAz--6Ryt+DMaMvQ@mail.gmail.com>
In-Reply-To: <CAOJ7v-22T7hLMdC2je0nLk34MXQ8L+JFWLtAz--6Ryt+DMaMvQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: multipart/alternative; boundary="_000_37s61e9ckw02929t4v3gflwo1391458112947emailandroidcom_"
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsUyM+Jvja7L9/dBBrNOKVh0TGaz2DpVyGLt v3Z2B2aPKb83snos2FTqsWTJT6YA5igum5TUnMyy1CJ9uwSujJ7dF9gKFnpUbPq5m62B8aht FyMnh4SAicSajvPMELaYxIV769lAbCGBQ4wSO34qdjFyAdmLGCXOzlgElODgYBOwkOj+pw1S IyJQKHFh4QNGEFtYwFJizew2dpASEQEriZXX0yFMI4neU/UgFSwCKhK7Dn4Hq+YVcJP4NOED K8SmAImWzQfYQWxOgUCJxgdvwS5gBLrm+6k1TCA2s4C4xK0n85kgrhSQWLIH5mJRiZeP/7FC 1ORIrHv6iQVivqDEyZlPWCYwCs9C0j4LSdksJGUQcR2JBbs/sUHY2hLLFr5mhrHPHHjMhCy+ gJF9FSN7bmJmTnq54SZGYKwc3PJbdwfjqXMihxilOViUxHk/vHUOEhJITyxJzU5NLUgtii8q zUktPsTIxMEp1cDoJH997k7PEG5bA83CUolctrs/BL7NL12WOvObyUmOLzlPF6+uMrp9TH7j W5kDliyunF+vrAsJcfgRa9Z/f+OEtMjT87tPH256JrVQY3nWmi1c9/9JHV26PPHzPw/DDo7W KRyBvO21bN+OlWU9P1bV7ztT9re5xW2X9g1rf0xqPSY93eavzq7NSizFGYmGWsxFxYkA5lFs vGMCAAA=
Subject: Re: [rtcweb] Rejecting MediaStreamTracks in JSEP
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Feb 2014 20:08:40 -0000

Hi,

Would this be solved by using uni-directional m- lines?

Regards,

Christer

Sent from my Sony Ericsson Xperia arc S

Justin Uberti <juberti@google.com> wrote:



While working on the latest JSEP update, I came across the following problem:

When a answerer wants to reject a "media stream" in 3264, it sets the m= line port in the answer to zero. However, when an endpoint wants to reject a remote MediaStreamTrack without rejecting the m= line entirely, because it is using the m= line for its own MediaStreamTrack, we don't have a clear way to express that. While setting a=sendonly in the answer will tell the other side to stop sending data, this won't kill the remote track. As far as the remote side is concerned, its track is just 'paused'/'held', and is still associated with the m= line.

Note that there is no such problem if an endpoint decides to kill its own local MediaStreamTrack; in the offer it sends to indicate this, in addition to setting the m= line to a=recvonly, it can also remove the MSID of the track from the m= line, indicating the track is gone. In other words, the a=msid attribute serves as the binding of MST to m= line, and its absence indicates the track is gone.

Therefore, I think we need some similar way for a receiver to do the same for a remote track. And fortunately, I think we have a surface that can be used for this, namely the "recv-appId" attribute that has been discussed in the context of unified-plan and explained in http://tools.ietf.org/id/draft-even-mmusic-application-token-02.txt and unified-plan. If an endpoint doesn't want to receive a particular track on a m= line, it sets the m= line to a=sendonly and also removes any a=recv-appId.

Below is an example of an audio call between A and B, with MediaStreamTracks MSTA and MSTB. A initially generates an offer, and then I show 4 different answer scenarios for various cases.

1) A generates offer with MSTA
m=audio X
a=msid:MSTA
a=recv-appId:1 # use 1 in the header extension when sending MSTA

2a) Normal answer: B adds its own track MSTB, generates answer:
m=audio Y
a=msid:MSTB
a=recv-appId:1

2b) Add+reject answer: B adds its own track MSTB, stops MSTA, generates answer:
m=audio Y
a=msid:MSB
a=sendonly
# no appid; A can realize that MSA has been rejected

2c) Reject-only answer: B stops MSTA without adding a stream, generates answer:
m=audio 0
# entire m-line has been rejected

2d) Do-nothing answer: B does nothing, generates answer:
m=audio Y
a=recv-appId:1
a=recvonly

If this seems reasonable, I plan to use this mechanism for handling m= line allocation in JSEP.

Also, this essentially makes recv-appId the converse of MSID; for simplicity, I think we should consider unifying these concepts into a single document.