我一直在尝试获取在 safari 浏览器上运行的 Web 应用程序的 webrtc 日志,类似于我们about:webrtc通过使用chrome://webrtc-internals.
或者,是否有任何用于 webrtc 的 js API 来获取控制台本身的日志,类似于我们在使用 RTCLogger 的原生 Android 和 iOS 应用程序中使用的。
提前致谢
我正在为使用C ++的音频呼叫实现WebRTC对等连接。
我有两个线程_worker_thread和_signaling_thread。现在,当我尝试_peerConnectionFactory通过调用方法进行创建时webrtc::CreatePeerConnectionFactory(),我的应用程序崩溃了。我该如何运作?
_signaling_thread.reset(new rtc::Thread());
if(!_signaling_thread->Start())
{
printf("_signaling_thread is Failed");
return;
}
_worker_thread.reset(new rtc::Thread());
if (!_worker_thread->Start()) {
printf( "_worker_thread is Failed");
return;
}
_peerConnectionFactory = webrtc::CreatePeerConnectionFactory(_worker_thread.get(),_signaling_thread.get(),NULL,NULL,NULL);
Run Code Online (Sandbox Code Playgroud)
这是我得到的回溯
* thread #15: tid = 0x17e516, 0x00000001008d5674 MyAPP`rtc::MessageQueue::Get(rtc::Message*, int, bool) + 816, stop reason = EXC_BAD_ACCESS (code=1, address=0x100000038)
* frame #0: 0x00000001008d5674 MyAPP`rtc::MessageQueue::Get(rtc::Message*, int, bool) + 816
frame #1: 0x00000001008e5fb0 MyAPP`rtc::Thread::ProcessMessages(int) + 100
frame #2: 0x00000001008e5e44 MyAPP`rtc::Thread::PreRun(void*) + 88
frame #3: 0x0000000199337b3c libsystem_pthread.dylib`_pthread_body + 156 …Run Code Online (Sandbox Code Playgroud) 我正在编译我的项目,ndk并且想c++_static用来构建我的项目。为此,我正在使用-
APP_STL := c++_static
Run Code Online (Sandbox Code Playgroud)
和
APP_CPPFLAGS := -std=c++11 -pthread -frtti -Wno-format-extra-args -Wno-format-zero-length -Wdeprecated-declarations -fno-builtin-cos -fno-builtin-sin -fno-builtin-cosf -fno-builtin-sinf -fexceptionsin
Run Code Online (Sandbox Code Playgroud)
在我的 Application.mk
但这给了我错误:
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:313:9: error: '::signbit' has not been declared
using ::signbit;
^
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:314:9: error: '::fpclassify' has not been declared
using ::fpclassify;
^
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:315:9: error: '::isfinite' has not been declared
using ::isfinite;
^
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:316:9: error: '::isinf' has not been declared
using ::isinf;
^
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:318:9: error: '::isnormal' has not been declared
using ::isnormal;
^
/Users/aagman/Desktop/Project/Android/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath:319:9: error: '::isgreater' has not …Run Code Online (Sandbox Code Playgroud) 我正在尝试基于 WebRTC 为 Android/iOS 应用程序实现 DTMF。Android 上有 DTMF API 吗?我尝试过拨打以下电话:
m_peerConnectionFactory.createdtmfsender(localAudioTrack);
m_peerConnectionFactory.insertDtmf(tone, duration,gap);
Run Code Online (Sandbox Code Playgroud)
我尝试过使用上面的 javascript api,它在浏览器上运行良好,但无法在 Android 上运行。我还没有在 iOS 上尝试过,因为我需要先让它在 Android 上运行。
请告诉我 Android/iOS 是否支持此功能?如果是的话,有人可以帮我提供正确的 api 吗
使用的 libjingle 版本:chrome 74.0.3729.169
webrtc peer-connection rtcpeerconnection webrtc-android webrtc-ios