Merging gst-examples
[platform/upstream/gstreamer.git] / subprojects / gst-examples / webrtc / check / validate / scenarios / open_data_channel.scenario
1 description, summary="Open a data channel"
2 include,location=negotiation_initiator.scenario
3 include,location=bundle_policy.scenario
4
5 set-webrtc-options, local-bundle-policy="$(local_bundle_policy)", remote-bundle-policy="$(remote_bundle_policy)"
6
7 # add the channel on the initiator so that datachannel is added to the sdp
8 add-data-channel, which="$(negotiation_initiator)", id="gstreamer";
9
10 # negotiate
11 create-offer, which="$(negotiation_initiator)";
12 wait-for-negotiation-state, which="$(negotiation_responder)", state="offer-set"
13 create-answer, which="$(negotiation_responder)";
14 wait-for-negotiation-state, which="$(negotiation_initiator)", state="answer-set"
15
16 # ensure data channel is created
17 wait-for-data-channel, which="$(negotiation_responder)", id="gstreamer";
18 wait-for-data-channel, which="$(negotiation_initiator)", id="gstreamer";
19 wait-for-data-channel-state, which="$(negotiation_initiator)", id="gstreamer", state="open";
20
21 # close the data channel
22 close-data-channel, which="$(negotiation_initiator)", id="gstreamer"
23 wait-for-data-channel-state, which="$(negotiation_responder)", id="gstreamer", state="closed";