看板 MacDev 關於我們 聯絡資訊
我作了一個singleton audioPlayer讓整個app共用 但是要我怎麼在各個viewcontroller中得到目前撥放音樂的 currenttime及duration google一下http://goo.gl/Mk1EOl 但是一執行就出錯了 請問要怎樣才能取得目前時間跟總長呢 謝謝! 抱歉 我自己耍笨 打成[AVPlayer playerWithURL:URL]; 改成[[AVAudioPlayer alloc] initWithContentsOfURL:URL error:nil]; 就可以取得了... XD -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.125.154 ※ 文章網址: http://www.ptt.cc/bbs/MacDev/M.1409851437.A.409.html
darktt: 我的 blog 有相關的教學:http://ppt.cc/O7Cy 09/05 07:12
starkite: d大謝謝 播放停止是正常的 是要取得currenttime及 09/05 09:57
starkite: duration時就錯誤了 09/05 09:57
※ 編輯: starkite (114.32.162.165), 09/05/2014 10:19:35