Open WebRTC Toolkit Client iOS SDK Documentation

Open WebRTC Toolkit Client iOS SDK Documentation

搞不懂怎么跑sdk,所以看看文档
/Users/zhangbin/tet/webrtc_build/owt-native/src/src/talk/owt/docs/ios 下面的ios.md

  • api 是oc的

1 Introduction {#section1}

Open WebRTC Toolkit Client SDK for iOS provides the tools for developing iOS native WebRTC applications using Objective-C APIs. This document describes all the APIs available in the SDK and how to use them.
This SDK is interoperable with Open WebRTC Toolkit Client SDK for JavaScript*, C++ and Android*.
Refer to the Release Notes for the latest information in the SDK release package, including features, bug fixes and known issues.

2 Supported platforms {#section2}

Open WebRTC Toolkit Client SDK for iOS supports in iOS 9.0 and later versions.
The following devices have been tested using this SDK:

  • iPhone* 6, 7 Plus and X.
  • iPad Air*

3 Getting started {#section3}

有俩sample
有三个静态的sdk库及头文件
owt.framework 是一个连接到的会议或者p2p端点的库
webrtc.framework 是一个webrtc协议的库,源码就是webrtc,唯一的修改是支持openssl,因此修改了 其代码
libsioclient.a是一个包含有Socket.IO的cpp客户端,不支持TLS加密
libsioclient tls 支持tls
libsioclient tls no verification 是支持tls但是跳过了服务端的认证
在自己的工程里加上-Objc 选项在other link flags中再编译。
The release package includes two sample applications to get you started quickly with the SDK. The following three static libraries are provided in the SDK along with their respective headers:

  • OWT.framework - a framework providing the abilities to connect to conference server or another Open WebRTC Toolkit P2P endpoints.
  • WebRTC.framework - a framework providing WebRTC features. You can find its source code at https://webrtc.googlesource.com/src. We modified some code make it work with OpenSSL.
  • libsioclient.a - this library includes Socket.IO C++ client without TLS features.
  • libsioclient_tls.a - this library includes the Socket.IO C++ client with TLS features.
  • libsioclient_tls_no_verification.a - this library includes the Socket.IO C++ client with TLS feature, but will skip verification of server’s certificate.
    Please add -ObjC to “Other Linker Flags” in the your project’s build settings.

4 Socket.IO {#section4}

Socket.IO cpp client is an open source project host on Github.
Please make sure your app has network access before making Socket.IO connection. As Socket.IO cpp client uses low level network APIs, iOS system may not ask user for network permission. Thus, Socket.IO connection will fail because app does not have network access.
The Socket.IO TLS feature is determined at compile time and cannot be switched at runtime. If you are using secure connections, link your application with libsioclient_tls.a; otherwise, link it with libsioclient.a. Conference sample use libsioclient_tls_no_verification.a by default. This lib enables TLS but does not verify server’s certification. It was provided for evaluation use only. Do not use it in production environments.
The libsioclient_tls.a included in release package has been enhanced so it will verify server’s certificate. If the server is using an invalid certificate, handshake will fail. You can also compile Socket.IO lib (commit 725a8e0e17ecead64574fd9879bd7029b0bf25fa) by yourself. Make sure you link to OpenSSL 1.1.0l to build Socket.IO lib.

5 Background modes {#section5}

设备锁定时,socket链接会断开。
如果app想保持与服务器的链接,VOIP 必须加在app的后台模式中。

Socket connections are disconnected when the device is locked. If your app must remain connected with server, “VoIP” needs to be added to your app’s background modes. For detailed information about background execution, please refer to the iOS developer library.

6 NAT and firewall traversal {#section6}

nat 和 防火墙的穿透
本sdk 支持所有的nat类型和防火墙,这是因为搭配了STUN TURN ICE 服务。 coturn turn服务器被使用了。
Open WebRTC Toolkit Client SDK for iOS fully supports NAT and firewall traversal with STUN / TURN / ICE. The Coturn TURN server from https://github.com/coturn/coturn can be one choice.

7 Customize signaling channel {#section7}

定制的信令通道,用于传输建立webrtc session的信令数据
信令通道也能用来p2psession创建
Signaling channel is an implementation to transmit signaling data for creating a WebRTC session. Signaling channel for P2P sessions can be customized by implementing OWTP2PSignalingChannelProtocol. We provide a default SocketSignalingChannel in sample which works with PeerServer in the release package.
OWTP2PClient implements OWTP2PSignalingChannelObserver, and will be registered into OWTP2PSignalingChannelProtocol's implementation, so you can invoke its methods to notify OWTP2PClient during your signaling channel implementation when a new message is coming or connection is lost.

8 Known issues {#section8}

Here is a list of known issues:

  • If you create multiple OWTLocalStreams from camera with different resolutions, previous streams will be black.

9 Video codecs {#section9}

Both VP8 and H.264 are supported. H.264 is recommended since it has hardware support.

10 Video frame filter {#section10}

Video frame filter allows app to modify captured video frames before sending to video sink or encoder.
To enable video frame filter, please implement one or more filters and make video frames flow like this: RTCCameraVideoCapturer->filter(s)->RTCVideoSource->… An example of video frame filter can be found in conference sample.

11 Privacy and security {#section11}

SDK will send operation system’s name and version, libwebrtc version and abilities, SDK name and version to conference server and P2P endpoints it tries to make connection. SDK does not store this information on disk.

Note: * Other names and brands may be claimed as the property of others.

demo

ld: warning: ignoring file /Users/zhangbin/tet/webrtc_build/owt-native/demo/owt_ios_demo/libs/deps/libsioclient_tls.a, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )
ld: warning: ignoring file /Users/zhangbin/tet/webrtc_build/owt-native/demo/owt_ios_demo/libs/WebRTC.framework/WebRTC, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )
ld: warning: ignoring file /Users/zhangbin/tet/webrtc_build/owt-native/demo/owt_ios_demo/libs/OWT.framework/OWT, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )
  • 在这里插入图片描述
发布了664 篇原创文章 · 获赞 55 · 访问量 217万+

猜你喜欢

转载自blog.csdn.net/commshare/article/details/104096803