1
我已經在這條道路從下載服務器端的視頻在localhost:播放視頻從本地主機
/Users/adrian/Library/Application Support/iPhone Simulator/4.3.2/Applications/60584763-39F6-4124-805D-BEFDE453206D/Documents/videos/bar.mpeg
乃至視頻在此路徑存在。
但是,當我嘗試播放它時,屏幕變黑,沒有播放視頻。
我做了這樣的:
moviePlayer = [[CustomMoviePlayerViewController alloc] initWithPath:[NSString stringWithFormat:@"/Users/adrian/Library/Application Support/iPhone Simulator/4.3.2/Applications/60584763-39F6-4124-805D-BEFDE453206D/Documents/videos/bar.mpeg"]];
[moviePlayer readyPlayer];
[self presentModalViewController:moviePlayer animated:YES];
當我把資源文件夾都相同的視頻作品perfect.So我認爲這個問題是與path.But有什麼問題呢?
,我怎麼可以添加從外部文件夾到我的項目? – adrian
順便說一句,上面的代碼不是新的....我說這已經起作用了! – adrian
我不認爲你可以用這種方式使用該文件,你必須將它添加到你的Xcode項目。 –