浏览代码

playback controller: replace deprecated API call in VLCKit

This closes #143
Felix Paul Kühne 7 年之前
父节点
当前提交
8db0d20b8a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Sources/VLCPlaybackController.m

+ 1 - 1
Sources/VLCPlaybackController.m

@@ -138,7 +138,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
 
 - (void)openVideoSubTitlesFromFile:(NSString *)pathToFile
 {
-    [_mediaPlayer openVideoSubTitlesFromFile:pathToFile];
+    [_mediaPlayer addPlaybackSlave:[NSURL fileURLWithPath:pathToFile] type:VLCMediaPlaybackSlaveTypeSubtitle enforce:YES];
 }
 
 - (void)playMediaList:(VLCMediaList *)mediaList firstIndex:(NSInteger)index subtitlesFilePath:(NSString *)subsFilePath