tapharmonic / learning-av-foundation Goto Github PK
View Code? Open in Web Editor NEWSample code for Bob McCune's Learning AV Foundation book.
Home Page: http://learningavfoundation.com
License: MIT License
Sample code for Bob McCune's Learning AV Foundation book.
Home Page: http://learningavfoundation.com
License: MIT License
in chapter 2, we should set Session Category in '- (void)applicationWillResignActive:(UIApplication *)application',not '- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions' .
like this :
when I use
[nsnc addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
else { //AVAudioSessionInterruptionTypeEnd AVAudioSessionInterruptionOptions options = [info[AVAudioSessionInterruptionOptionKey] unsignedIntegerValue]; if (options == AVAudioSessionInterruptionOptionShouldResume) { [self play]; if (self.delegate) { [self.delegate playbackBegan]; } }
music not playback to play tell me why [email protected]
chapter11 选区过渡模式不能播放
I want to make time lapse video,but when reduce fps ,it seems done not work. Could you give me some advices. Thanks
In KameraWriter_Final I found
self.captureSession.sessionPreset = [self sessionPreset];
did in fact not take effect, where as
[self.captureSession setSessionPreset:AVCaptureSessionPresetInputPriority];
did. Not sure why the return value didn't work, maybe missing const?
Also, it is worth adding support for check for
if(![videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset1280x720]){
NSDictionary *userInfo = @{NSLocalizedDescriptionKey : @"Camera does not support session preset"};
*error = [NSError errorWithDomain:THCameraErrorDomain
code:THCameraErrorFailedToAddInput
userInfo:userInfo];
return NO;
}
as the front camera on an iPad2 for instance fails without throwing an error.
I selected 3 videos in Chapter 11/FifteenSeconds_Final,when run the app,and select 3 videos in app,the pointer show at the end,and THPlayerViewController show nothing!
Chapter 2 contains the following passage:
With the audio session properly configured, redeploy the app to your device and run the tests again. You can hear that toggling the Ring/Silent switch no longer mutes the audio. This behavior looks good, so let’s verify that your audio continues to play when you lock the device. If you hit the Lock button, you can hear the audio continues to... Houston, we have a problem. You’re still seeing the same behavior as before. Shouldn’t you have solved this issue by setting the category to AVAudioSessionCategoryPlayback? The answer is no. Setting this category makes the app eligible to play audio in the background, which is the state we’re in when the device locks, but you still need to explicitly opt in to that behavior by making a small change to the application’s Info.plist.
then continues to describe how to add the relevant background mode to the app's plist. However, the starter already has the background mode added, so the passage and explanation can confuse readers.
You see for the camera writer
Would the tap to focus for the tapped screen point work for this as they refer to the preview layer if i am not mistaken.
Kevin reported that audio and video get out of sync when switching cameras during a recording session. This is most likely due to the presentation time stamps getting out of sync. Look into a resolution if this issue.
When i receive a call the display freezes is there a way i can stop this from happening
In chapter6, I find the same problem in stackoverflow.
I need your help.
After completing the code changes to ZoomKamera_Starter from Listing 7.2 and running the resulting app I find that the app will build, then run on my iPhone 6 but only displays a black screen. A few seconds later Xcode will display the error 'ZoomKamera [356:21199] Error: (null)' I reviewed the code I entered to ensure that it was accurate. Various troubleshooting measures (cleaning project, deleted app on iPhone, restarting iPhone, restarting Xcode) did not resolve issue. It's also reproducible when running project in second user account on Mac. Also occurs when running ZoomKamera_Starter without making any changes.
ZoomKamera_Final runs fine however.
This is on a MacBook Pro (mid-2012) running OS X 10.12.1 Sierra and Xcode 8.1 (8T61a).
We have moved pretty much 100% to Swift. Wondering when an updated version of the book will be coming out. thanks :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.