File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed
Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -615,11 +615,6 @@ async def createOffer(self) -> RTCSessionDescription:
615615 # check state is valid
616616 self .__assertNotClosed ()
617617
618- if not self .__sctp and not self .__transceivers :
619- raise InternalError (
620- "Cannot create an offer with no media and no data channels"
621- )
622-
623618 # offer codecs
624619 for transceiver in self .__transceivers :
625620 transceiver ._codecs = filter_preferred_codecs (
Original file line number Diff line number Diff line change @@ -4638,16 +4638,19 @@ async def test_createOffer_closed(self) -> None:
46384638
46394639 @asynctest
46404640 async def test_createOffer_without_media (self ) -> None :
4641- pc = RTCPeerConnection ()
4642- with self .assertRaises (InternalError ) as cm :
4643- await pc .createOffer ()
4644- self .assertEqual (
4645- str (cm .exception ),
4646- "Cannot create an offer with no media and no data channels" ,
4647- )
4641+ pc1 = RTCPeerConnection ()
4642+ pc2 = RTCPeerConnection ()
46484643
4649- # close
4650- await pc .close ()
4644+ offer = await pc1 .createOffer ()
4645+ await pc1 .setLocalDescription (offer )
4646+ await pc2 .setRemoteDescription (offer )
4647+
4648+ answer = await pc2 .createAnswer ()
4649+ await pc2 .setLocalDescription (answer )
4650+ await pc1 .setRemoteDescription (answer )
4651+
4652+ await pc1 .close ()
4653+ await pc2 .close ()
46514654
46524655 @asynctest
46534656 async def test_setLocalDescription_implicit (self ) -> None :
You can’t perform that action at this time.
0 commit comments