Sample code to add to any controller which should handle audio session route changed event. Note that you should use only the functions in .m file since this is just a sample code.
Reference: MPMoviePlayerController - Auto-Resume on headphone plugged in
Origin Author: SAKrisT
在Controller中新增AudioSession的Observer
當AudioSession改變時,在此處處理
將AudioSession移除
全站熱搜