VLCKit
VLCMediaListPlayer.h
1 /*****************************************************************************
2  * VLCMediaListPlayer.h: VLCKit.framework VLCMediaListPlayer implementation
3  *****************************************************************************
4  * Copyright (C) 2009 Pierre d'Herbemont
5  * Partial Copyright (C) 2009-2013 Felix Paul Kühne
6  * Copyright (C) 2009-2019 VLC authors and VideoLAN
7 
8  * $Id$
9  *
10  * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
11  * Felix Paul Kühne <fkuehne # videolan.org>
12  * Soomin Lee <bubu # mikan.io>
13  *
14  * This program is free software; you can redistribute it and/or modify it
15  * under the terms of the GNU Lesser General Public License as published by
16  * the Free Software Foundation; either version 2.1 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with this program; if not, write to the Free Software Foundation,
26  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
27  *****************************************************************************/
28 
30 
31 NS_ASSUME_NONNULL_BEGIN
32 
37 typedef NS_ENUM(NSInteger, VLCRepeatMode) {
38  VLCDoNotRepeat,
39  VLCRepeatCurrentItem,
40  VLCRepeatAllItems
41 };
42 
43 @protocol VLCMediaListPlayerDelegate <NSObject>
44 @optional
48 - (void)mediaListPlayerFinishedPlayback:(VLCMediaListPlayer *)player;
49 
53 - (void)mediaListPlayer:(VLCMediaListPlayer *)player
54  nextMedia:(VLCMedia *)media;
55 
61 - (void)mediaListPlayerStopped:(VLCMediaListPlayer *)player;
62 @end
63 
67 @interface VLCMediaListPlayer : NSObject
68 
73 @property (readwrite, nullable) VLCMediaList *mediaList;
74 
80 @property (readwrite, nullable) VLCMedia *rootMedia;
81 
85 @property (readonly) VLCMediaPlayer *mediaPlayer;
86 
90 @property (nonatomic, weak, nullable) id <VLCMediaListPlayerDelegate> delegate;
91 
96 - (instancetype)initWithDrawable:(id)drawable;
101 - (instancetype)initWithOptions:(NSArray *)options;
107 - (instancetype)initWithOptions:(NSArray *)options andDrawable:(id)drawable;
108 
112 - (void)play;
116 - (void)pause;
120 - (void)stop;
121 
126 @property (NS_NONATOMIC_IOSONLY, readonly) BOOL next;
131 @property (NS_NONATOMIC_IOSONLY, readonly) BOOL previous;
132 
137 - (BOOL)playItemAtIndex:(int)index __attribute__((deprecated));
138 
142 - (void)playItemAtNumber:(NSNumber *)index;
143 
148 @property (readwrite) VLCRepeatMode repeatMode;
149 
153 - (void)playMedia:(VLCMedia *)media;
154 
155 @end
156 
157 NS_ASSUME_NONNULL_END
-[VLCMediaListPlayer play]
void play()
VLCMediaListPlayerDelegate-p
Definition: VLCMediaListPlayer.h:43
VLCMediaListPlayer::repeatMode
VLCRepeatMode repeatMode
Definition: VLCMediaListPlayer.h:148
VLCMediaList
Definition: VLCMediaList.h:68
VLCMedia
Definition: VLCMedia.h:112
VLCMediaPlayer
Definition: VLCMediaPlayer.h:184
VLCMediaListPlayer::delegate
id< VLCMediaListPlayerDelegate > delegate
Definition: VLCMediaListPlayer.h:90
VLCMediaListPlayer::mediaList
VLCMediaList * mediaList
Definition: VLCMediaListPlayer.h:73
VLCMediaListPlayer
Definition: VLCMediaListPlayer.h:67
VLCMediaListPlayer::mediaPlayer
VLCMediaPlayer * mediaPlayer
Definition: VLCMediaListPlayer.h:85
-[VLCMediaListPlayer stop]
void stop()
VLCMediaListPlayer::rootMedia
VLCMedia * rootMedia
Definition: VLCMediaListPlayer.h:80
-[VLCMediaListPlayer pause]
void pause()
VLCMediaListPlayer::next
BOOL next
Definition: VLCMediaListPlayer.h:126
VLCMediaListPlayer::previous
BOOL previous
Definition: VLCMediaListPlayer.h:131