Date: Fri, 29 Mar 2024 08:56:51 +0100 (CET) Message-ID: <2137132805.47411.1711699011284@docs.flashphoner.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_47410_1018623888.1711699011284" ------=_Part_47410_1018623888.1711699011284 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Since build 2.6.21 it is possible to use UDP or TCP transport to publi= sh or play WebRTC with option FP= WCSApi2StreamOptions.transport. The option is set while Stream object creat= ion and accepts the following values:
typedef NS_ENUM(NS= Integer, kFPWCSTransport) { kFPWCSTransportDefault, kFPWCSTransportUDP, kFPWCSTransportTCP };=20
Where
If the option is not set, the tran= sport defined in server settings is used.
The usage example in application b= ased on Objective C framework
FPWCSApi2Strea= mOptions *options =3D [[FPWCSApi2StreamOptions alloc] init]; options.name =3D [self getStreamName]; ... options.transport =3D _useTCPTransport.control.on ? kFPWCSTransportTCP = : kFPWCSTransportUDP; NSError *error; _localStream =3D [_session createStream:options error:&error]; ...=20
The usage example in application b= ased on Swift framework
let opt= ions =3D FPWCSApi2StreamOptions() options.name =3D publishName.text ... options.transport =3D tcpTransport.isOn ? kFPWCSTransport.fpwcs= TransportTCP : kFPWCSTransport.fpwcsTransportUDP; do { try publishStream =3D session!.createStream(options) } catch { print(error); }=20