unreal.MediaPlaylist
¶
-
class
unreal.
MediaPlaylist
(outer=None, name='None')¶ Bases:
unreal.Object
Implements a media play list.
C++ Source:
Module: MediaAssets
File: MediaPlaylist.h
Editor Properties: (see get_editor_property/set_editor_property)
items
(Array(MediaSource)): [Read-Write] List of media sources to play.
-
add
(media_source) → bool¶ Add a media source to the play list. AddFile, AddUrl, Insert, RemoveAll, Remove, Replace:
- Parameters
media_source (MediaSource) – The media source to append.
- Returns
true if the media source was added, false otherwise.
- Return type
-
add_file
(file_path) → bool¶ Add a media file path to the play list. Add, AddUrl, Insert, RemoveAll, Remove, Replace:
-
add_url
(url) → bool¶ Add a media URL to the play list. Add, AddFile, Insert, RemoveAll, Remove, Replace:
-
get
(index) → MediaSource¶ Get the media source at the specified index. GetNext, GetRandom:
- Parameters
index (int32) – The index of the media source to get.
- Returns
The media source, or nullptr if the index doesn’t exist.
- Return type
-
get_next
() -> (MediaSource, out_index=int32)¶ Get the next media source in the play list. , GetPrevious, GetRandom:
- Returns
The media source after the current one, or nullptr if the list is empty.
out_index (int32): Index of the current media source (will contain the new index).
- Return type
int32
-
get_previous
() -> (MediaSource, out_index=int32)¶ Get the previous media source in the play list. , GetNext, GetRandom:
- Returns
The media source before the current one, or nullptr if the list is empty.
out_index (int32): Index of the current media source (will contain the new index).
- Return type
int32
-
get_random
() -> (MediaSource, out_index=int32)¶ Get a random media source in the play list. Get, GetNext, GetPrevious:
- Returns
The random media source, or nullptr if the list is empty.
out_index (int32): Will contain the index of the returned media source.
- Return type
int32
-
insert
(media_source, index) → None¶ Insert a media source into the play list at the given position. Add, Remove, RemoveAll, Replace:
- Parameters
media_source (MediaSource) – The media source to insert.
index (int32) – The index to insert into.
-
num
() → int32¶ Get the number of media sources in the play list.
- Returns
Number of media sources.
- Return type
int32
-
remove
(media_source) → bool¶ Remove all occurrences of the given media source in the play list. Add, Insert, Remove, Replace:
- Parameters
media_source (MediaSource) – The media source to remove.
- Returns
true if the media source was removed, false otherwise.
- Return type
-
remove_at
(index) → bool¶ Remove the media source at the specified position. Add, Insert, RemoveAll, Replace:
- Parameters
index (int32) – The index of the media source to remove.
- Returns
true if the media source was removed, false otherwise.
- Return type
-
replace
(index, replacement) → bool¶ Replace the media source at the specified position. Add, Insert, RemoveAll, RemoveAt:
- Parameters
index (int32) – The index of the media source to replace.
replacement (MediaSource) – The replacement media source.
- Returns
true if the media source was replaced, false otherwise.
- Return type