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移除

 

arrow
arrow
    全站熱搜

    Hubert 發表在 痞客邦 留言(0) 人氣()