Class Playlist
Inheritance
object
Playlist
Assembly: .dll
[Serializable]
public class Playlist
Constructors
|
Edit this page
View Source
Declaration
public Playlist(List<MediaItem> mediaItems = null, string name = null)
Parameters
Type |
Name |
Description |
List<MediaItem> |
mediaItems |
|
string |
name |
|
Properties
|
Edit this page
View Source
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
Declaration
public int Index { get; }
Property Value
|
Edit this page
View Source
Declaration
public bool IsEmpty { get; }
Property Value
|
Edit this page
View Source
Declaration
public List<MediaItem> MediaItems { get; }
Property Value
|
Edit this page
View Source
Declaration
public string Name { get; set; }
Property Value
Methods
|
Edit this page
View Source
Declaration
public void Add(MediaItem item)
Parameters
|
Edit this page
View Source
Declaration
|
Edit this page
View Source
Declaration
public bool Contains(MediaItem mediaItem)
Parameters
Returns
|
Edit this page
View Source
Declaration
public int GetIndex(MediaItem mediaItem)
Parameters
Returns
|
Edit this page
View Source
Gets the index of a MediaItem in the Playlist by its media ID.
This is useful when you have the media ID but not the actual MediaItem.
If the media ID is not found, it returns -1.
Declaration
public int GetIndex(string mediaId)
Parameters
Type |
Name |
Description |
string |
mediaId |
|
Returns
|
Edit this page
View Source
Gets a MediaItem from the Playlist by its media ID.
This is useful when you have the media ID but not the actual MediaItem.
If the media ID is not found, it returns null.
Declaration
public MediaItem GetMediaItem(string mediaId)
Parameters
Type |
Name |
Description |
string |
mediaId |
|
Returns
|
Edit this page
View Source
Declaration
public void Insert(int index, MediaItem item)
Parameters
Type |
Name |
Description |
int |
index |
|
MediaItem |
item |
|
|
Edit this page
View Source
Declaration
public void Remove(MediaItem item)
Parameters
|
Edit this page
View Source
Declaration
public void RemoveAt(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
|
Edit this page
View Source
Declaration
public void Set(int index, MediaItem item)
Parameters
Type |
Name |
Description |
int |
index |
|
MediaItem |
item |
|