Sfoglia il codice sorgente

vpc: fix media option propagation in lists (closes #14978)

(cherry picked from commit ff827de47def95d7d7627464a24600e8e191395e)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Felix Paul Kühne 10 anni fa
parent
commit
8c3e9d3e95

+ 4 - 1
Sources/VLCPlaybackController+MediaLibrary.m

@@ -79,8 +79,11 @@
 - (void)configureMediaListWithFiles:(NSArray *)files indexToPlay:(int)index
 {
     VLCMediaList *list = [[VLCMediaList alloc] init];
+    VLCMedia *media;
     for (MLFile *file in files.reverseObjectEnumerator) {
-        [list addMedia:[VLCMedia mediaWithURL:file.url]];
+        media = [VLCMedia mediaWithURL:file.url];
+        [media addOptions:self.mediaOptionsDictionary];
+        [list addMedia:media];
     }
     [self configureMediaList:list atIndex:index];
 }

+ 1 - 0
Sources/VLCPlaybackController.h

@@ -75,6 +75,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 @property (nonatomic, readonly) BOOL activePlaybackSession;
 @property (nonatomic, readonly) BOOL audioOnlyPlaybackSession;
 @property (nonatomic, readwrite) BOOL fullscreenSessionRequested;
+@property (nonatomic, readonly) NSDictionary *mediaOptionsDictionary;
 
 + (VLCPlaybackController *)sharedInstance;
 

File diff suppressed because it is too large
+ 13 - 49
Sources/VLCPlaybackController.m