Open rcodarini opened 4 years ago
Hi @rcodarini,
I'm working to an iOS ReplayKit Broadcast Extension in order to stream my iPad screen to a Twilio Room.
Are you trying to share just your application's screen or the entire device's screen (including the home screen and other apps)? A broadcast extension is not needed if you only want to share the application's screen.
Video streaming is working fine but Audio doesn't work. (In both directions)
A broadcast extension cannot playback audio. If you want that you will need to connect a Participant from your main application process.
the function processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) is called without sampleBufferType == .audioMic
It should be, did you enable the microphone when you tapped on the RPSystemBroadcastPickerView? If you don't tap to enable the microphone then audio samples of sampleBufferType == .audioMic
will not be delivered to your extension.
I am working on some documentation improvements for our ReplayKit example which might help clarify the use cases. Until then, feel free to ask any more questions that you might have about how to use ReplayKit.
Best, Chris
Hi @ceaglest, sorry for the delay,
Are you trying to share just your application's screen or the entire device's screen (including the home screen and other apps)? A broadcast extension is not needed if you only want to share the application's screen.
I would like to share the entire screen, and it works fine
A broadcast extension cannot playback audio. If you want that you will need to connect a Participant from your main application process.
You mean that I have to leave the room connected in the main application? What happens when the app goes in background?
It should be, did you enable the microphone when you tapped on the RPSystemBroadcastPickerView? If you don't tap to enable the microphone then audio samples of
sampleBufferType == .audioMic
will not be delivered to your extension.
Yes, the microphone is enabled before I start broadcasting
I am working on some documentation improvements for our ReplayKit example which might help clarify the use cases. Until then, feel free to ask any more questions that you might have about how to use ReplayKit.
Great
Regards Roberto
Hi @ceaglest I'm having the same issue described in this thread. I'm working on the Broadcast Extension to stream both video and audio. The main problem is that ReplayKit seems to reproduce only RPSampleBufferType.audioApp and RPSampleBufferType.video, but not RPSampleBufferType.audioMic, which is important for me to stream.
I've also followed this past thread: issue7. AndyBoyd seems to be in the same situation, but I don'understand what changes has he done on the example code to reach the goal. Also mixing two audio devices (audioApp and microphone) can be a good solution for me, but it seems doesn't work properly.
In SampleHandler file I have tried two ways: the first using your ReplayKitAudioCapturer file for audioDevice setting, second one using DefaultAudioDevice() and changing parameters with DefaultAudioDevice.DefaultAVAudioSessionConfigurationBlock(). In that block I have tried (no success) to change category and mode to AVAudioSession.sharedInstance().
I've noticed no errors in log, and the microphone is On, when I try to stream data. Have you some ideas of what I can do to stream also microphone audio? I have followed your ReplyKit Example code.
Thanks in advice,
David
Description
I'm working to an iOS ReplayKit Broadcast Extension in order to stream my iPad screen to a Twilio Room. The video streaming is working fine but the audio doesn't work.
Steps to Reproduce
RPSystemBroadcastPickerView
to start the Broadcast extensionprocessSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType)
is called without sampleBufferType == .audioMicLogs
Debug level logs are helpful when investigating issues. To enable debug level logging, add the following code to your application:
Here the logs from the extension
Versions
All relevant version information for the issue.
Video iOS SDK
3.2.2 via CocoaPods
Xcode
Xcode 11.4
iOS Version
13.3.1
iOS Device
iPad Pro 10,5"