- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发 WebRTC iOS 应用程序以从网络摄像头接收视频/音频。只有网络摄像头发送视频和音频,移动设备不发送任何内容。
我正在使用来自 CocoaPods (v11177.2.0) 的 libjingle_peerconnection 库。
一切正常,我可以正常接收视频和音频,但我遇到了设备权限问题。我第一次使用该应用程序时,当我想从网络摄像头接收视频时,iOS 应用程序要求获得麦克风许可。这很重要,因为设备不发送音频,而我的客户说“为什么应用程序要求麦克风??”
这很奇怪,因为对于相机,该应用不需要任何许可。
我已经检查了 SDP,似乎两者都可以(提供和回答)。
这是我创建 peerconnection 对象的方式没有附加流:
RTCICEServer *stunServer = [[RTCICEServer alloc]initWithURI:[NSURL URLWithString:@"stun:stun.l.google.com:19302"] username:@"" password:@""];
NSMutableArray *iceServers = [NSMutableArray arrayWithObject:stunServer];
RTCPeerConnectionFactory *factory = [[RTCPeerConnectionFactory alloc]init];
NSArray *peerConnectionConstraints = @[[[RTCPair alloc] initWithKey:@"DtlsSrtpKeyAgreement" value:@"true"]];
RTCMediaConstraints *peerConnectionConstraints = [[RTCMediaConstraints alloc]initWithMandatoryConstraints:peerConnectionConstraints optionalConstraints:nil];
RTCPeerConnection *pConnection = [factory peerConnectionWithICEServers:iceServers constraints:peerConnectionConstraints delegate:self];
NSArray *sdpConstraints = @[[[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"],
[[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" value:@"true"]];
RTCMediaConstraints* sdpConstraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:sdpConstraints optionalConstraints:nil];
[pConnection createOfferWithDelegate:self constraints:sdpConstraints];
这是生成的 SDP Offer:
v=0
o=- 6528383367639880158 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 9 RTP/SAVPF 111 103 104 9 102 0 8 127 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:0QOsaBCKhCBBcHz5
a=ice-pwd:/y5snrrO3Qmq37m2aejRbK1E
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=recvonly
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:x1lfnVdo9lCRa9ykH6759WhY1SnI+dbLjKNbkTl+
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10; useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 red/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
m=video 9 RTP/SAVPF 100 101 116 117 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:0QOsaBCKhCBBcHz5
a=ice-pwd:/y5snrrO3Qmq37m2aejRbK1E
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=recvonly
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:x1lfnVdo9lCRa9ykH6759WhY1SnI+dbLjKNbkTl+
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtpmap:101 VP9/90000
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 transport-cc
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
这是来自网络摄像头的 SDP 回答:
v=0
o=- 3699612909 3699612909 IN IP4 0.0.0.0
s=-
c=IN IP4 0.0.0.0
t=0 0
a=msid-semantic: WMS
a=group:BUNDLE audio video
m=audio 1 RTP/SAVPF 111 0
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=mid:audio
a=rtcp:9 IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:0 PCMU/8000
a=sendonly
a=rtcp-mux
a=fmtp:111 minptime=10; useinbandfec=1
a=maxptime:60
a=ssrc:3192391506 cname:user604422501@host-6a96398f
a=ice-ufrag:r2kq
a=ice-pwd:6VJu/y0Kbc4iUDQB/1ZrnE
a=fingerprint:sha-256 57:26:29:A5:DD:CD:42:74:C9:A3:BB:C4:67:D1:1C:24:E9:4B:4C:86:6F:93:32:03:52:6B:2B:77:B3:C4:E8:88
m=video 1 RTP/SAVPF 100
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=mid:video
a=rtcp:9 IN IP4 0.0.0.0
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=sendonly
a=rtcp-mux
a=ssrc:455461391 cname:user604422501@host-6a96398f
a=ice-ufrag:r2kq
a=ice-pwd:6VJu/y0Kbc4iUDQB/1ZrnE
a=fingerprint:sha-256 57:26:29:A5:DD:CD:42:74:C9:A3:BB:C4:67:D1:1C:24:E9:4B:4C:86:6F:93:32:03:52:6B:2B:77:B3:C4:E8:88
如您所见,在 SDP 报价中,两种媒体(音频和视频)都是“receiveOnly”,在 SDP 中回答“sendOnly”,所以我认为没有与 SDP 相关的问题。
有人知道为什么要请求麦克风许可吗?如果您需要更多信息,请告诉我。
谢谢!
最佳答案
我没有使用过您的代码/库,对于那部分我无能为力,但是来自 Apple documentation我们可以阅读:
The first time your app’s audio session attempts to use an audio input route while using a category that enables recording, the system automatically prompts the user for permission. You can explicitly ask earlier by calling the requestRecordPermission(_:) method. Until the user grants your app permission to record, your app can record only silence.
这可能会给您一些线索,说明某处(可能在 libjingle 中)正在访问 iOS Audio Session
,并且可能是什么触发了麦克风权限。
关于ios - libjingle iOS : Don't ask for mic permission,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43050719/
Libjingle 看起来非常强大,并且附带了一堆示例程序和扩展。但我一直无法使用它,而且我在 IRC 上交谈过的人告诉我,他们发现该 API 很困惑,我应该使用其他东西。 但我愿意再试一次。有人有好
我下载了WebRTC的源代码,但在WebRTC上找不到任何libjingle的代码,也找不到WebRTC如何使用libjingle(在WebRTC的代码中找不到诸如XmppTask类的代码) 谁能给我
编译 libjingle 时,在 swtoolkit 上运行 'hammer.sh',我收到以下导入错误, root@den-pc:~/tejesh/libjingle-0.6.14/talk# sh
我下载并安装了libjingle-0.5.2.zip,并根据README还下载并安装了swtoolkit.0.9.1.zip、scons-local-2.1.0.alpha.20101125.tar.
我有一个基于 libjingle 并从 android 调用的 google talk 客户端,每次我尝试登录时,这就是我得到的一切 RECV RECV
据我们所知,xmpp 框架可用于 facebook 和 gmail 文本聊天。我发现 libjingle 用于 gmail 联系人的视频聊天。我们也可以将 libjingle 用于 Facebook
好的,尝试在 2 台装有 ubuntu 11.10 的笔记本电脑上运行 libjingle-0.6.14 中编译的“call”程序, 当我从第一台笔记本电脑登录,并从另一台笔记本电脑再次登录(使用不同
libjingle's developer guide相当含糊地提到了 libjingle 的 Jingle 实现与 XEP-0166 规范之间的不兼容性。它还提到它与 XEP-0167、XEP-01
几天来,我一直在努力让 PCP LibJingle 示例发挥作用。在解决了所有编译和运行错误之后,我现在遇到了一个我以前没有遇到过的错误。 当作为发送方或接收方运行程序时,程序会收到 503“服务不可
我想知道从 git checkout SDK 时如何获取 libjingle。我最终做的是在 build.gradle 中添加 libjingle 作为编译依赖: compile 'io.pristi
我正在开发 WebRTC iOS 应用程序以从网络摄像头接收视频/音频。只有网络摄像头发送视频和音频,移动设备不发送任何内容。 我正在使用来自 CocoaPods (v11177.2.0) 的 lib
好的,我正在尝试使用以下命令编译名为“pcp”的文件共享示例 wolfgang@den-pc:~/tejesh/libjingle-0.6.14/programs$ g++ -g -Wall -DP
我正在开发 native android WebRTC 客户端,该客户端支持从自定义设备流式传输音频(我正在通过蓝牙从该设备获取音频流)。我正在使用 libjingle 库来实现 WebRTC,我想知
我遵循了 libjingle 下载中包含的自述文件。安装所有第 3 方软件包并运行此命令: hammer.bat --jobs=6 --verbose --mode=all all_programs
我正在尝试将 io.pristine:libjingle 用于 WebRTC 项目之一。我在 Github 上找到了一个示例。 1- 我已经准备好我的 WebRTC 服务器,它通过用户身份验证从 Ch
我已从 https://code.google.com/p/webrtc/source/browse/trunk/talk 中 check out 代码我似乎找不到如何为 ARM (android)
伟大的开发者。我正在使用 io.pristine.libjingle:11139 的 webRTC 库进行视频通话。一切顺利,现在我只想打开手电筒,我研究了几乎所有与手电筒相关的问题,在那里我发现手电
所以我试图通过 webRTC 通过 socket.io 和 libjingle 将 Android 连接到浏览器,并且服务器在 Node.js 上运行。我面临的问题很奇怪。当 1 个客户端使用 And
仅在尝试在 64 位 下运行我的登录代码时,我是否无法登录 talk.google.com对于我的初步测试。 32 位工作正常。 启用日志记录宏和 siginput 日志记录后,我可以看到它失败的 X
我正在尝试在 Mac OSX Snow Leopard 上编译 libjingle。 INSTALL 文件像往常一样说到“./configure”、“make”和“make install”。但是 m
我是一名优秀的程序员,十分优秀!