-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDSK-2547 Re-writing AVPlayerExample #406
base: master
Are you sure you want to change the base?
Conversation
#import "TPCircularBuffer+AudioBufferList.h" | ||
|
||
// We want to get as close to 20 msec buffers as possible, to match the behavior of TVIDefaultAudioDevice. | ||
static double const kPreferredIOBufferDuration = 0.01; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use kPreferredIOBufferDuration
as 0.02
// We want to get as close to 20 msec buffers as possible, to match the behavior of TVIDefaultAudioDevice. | ||
static double const kPreferredIOBufferDuration = 0.01; | ||
// We will use stereo playback where available. Some audio routes may be restricted to mono only. | ||
static size_t const kPreferredNumberOfChannels = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use hint from AVPlayer to determine mono vs stereo
framesToCopy, | ||
&sourceRange, | ||
kPreferredNumberOfChannels); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make sure we are not turning on the capturing sample rate conversion stream on the tap.
rootVC.connect(contentUrl: videoUrl) | ||
} | ||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Lets use Twilio's video
- Do not launch with URL, remove plist entry.
videoPlayerView?.removeFromSuperview() | ||
videoPlayerView = nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment why we are doing prerollVideoPlayer
|
||
@IBAction func toggleAudioMixing(_ sender: Any) { | ||
// TODO: Pause/stop audio mixing on demand | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toggleAudioMixing
Contributing to Twilio
This pull requests replaces re-implements the AVPlayerExample -
The example uses the AudioDevice implemented in Co-Viewing example #325 .
TODOs