Commit 87069a36 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaListPlayer: add initWithOptions selector while retaining init's behavior

parent 6a7ce360
/*****************************************************************************
* VLCKit: MobileVLCKit
*****************************************************************************
* Copyright (C) 2010-2012 Pierre d'Herbemont and VideoLAN
* Copyright (C) 2010-2013 Pierre d'Herbemont and VideoLAN
*
* Authors: Pierre d'Herbemont
*
......@@ -26,6 +26,7 @@
#import <MobileVLCKit/VLCMediaDiscoverer.h>
#import <MobileVLCKit/VLCMediaList.h>
#import <MobileVLCKit/VLCMediaPlayer.h>
#import <MobileVLCKit/VLCMediaListPlayer.h>
#import <MobileVLCKit/VLCMediaThumbnailer.h>
#import <MobileVLCKit/VLCTime.h>
......
......@@ -55,6 +55,7 @@ typedef NSInteger VLCRepeatMode;
@property (readwrite, retain) VLCMedia *rootMedia;
@property (readonly, retain) VLCMediaPlayer *mediaPlayer;
- (id)initWithOptions:(NSArray *)options;
/**
* Basic play and stop are here. For other method, use the mediaPlayer.
......
......@@ -10,6 +10,7 @@ MobileVLCKit:
party scripts
- Added 2 sample projects illustrating video playback
- Added support for https and hls playback
- VLCMediaListPlayer is available now
VLCKit:
- VLCMediaThumbnailer is a public API on the Mac now matching the mobile
......@@ -19,6 +20,8 @@ VLCKit:
New APIs:
- VLCMediaThumbnailer:
- added property: snapshotPosition to overwrite the default
- VLCMediaListPlayer:
- added initWithOptions selector matching VLCMediaPlayer's implementation
Modified API behavior:
- VLCMediaPlayer:
......
......@@ -31,16 +31,22 @@
#import "VLCLibVLCBridging.h"
@implementation VLCMediaListPlayer
- (id)init
- (id)initWithOptions:(NSArray *)options
{
if (self = [super init])
{
_mediaPlayer = [[VLCMediaPlayer alloc] init];
if (self = [super init]) {
_mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options];
instance = libvlc_media_list_player_new([VLCLibrary sharedInstance]);
libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
}
return self;
instance = libvlc_media_list_player_new([VLCLibrary sharedInstance]);
libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
}
return self;
}
- (id)init
{
return [self initWithOptions:nil];
}
- (void)dealloc
......@@ -51,6 +57,7 @@
[_mediaList release];
[super dealloc];
}
- (VLCMediaPlayer *)mediaPlayer
{
return _mediaPlayer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment