[問題] audio問題

作者: starkite (可樂果)   2014-09-05 01:23:55
我作了一個singleton audioPlayer讓整個app共用
但是要我怎麼在各個viewcontroller中得到目前撥放音樂的
currenttime及duration
google一下http://goo.gl/Mk1EOl
但是一執行就出錯了
請問要怎樣才能取得目前時間跟總長呢
謝謝!
抱歉 我自己耍笨
打成[AVPlayer playerWithURL:URL];
改成[[AVAudioPlayer alloc] initWithContentsOfURL:URL error:nil];
就可以取得了... XD
作者: darktt (小朱)   2014-09-05 07:12:00
我的 blog 有相關的教學:http://ppt.cc/O7Cy
作者: starkite (可樂果)   2014-09-05 09:57:00
d大謝謝 播放停止是正常的 是要取得currenttime及duration時就錯誤了

Links booklink

Contact Us: admin [ a t ] ucptt.com