unreal.MagicLeapMusicServiceFunctionLibrary
¶
-
class
unreal.
MagicLeapMusicServiceFunctionLibrary
(outer=None, name='None')¶ Bases:
unreal.BlueprintFunctionLibrary
Provides music playback control of a Music Service Provider
C++ Source:
Plugin: MagicLeapMusicService
Module: MagicLeapMusicService
File: MagicLeapMusicServiceFunctionLibrary.h
-
classmethod
disconnect
() → bool¶ Disconnects from the currently connected service provider.
- Returns
True if successfully disconnected to the currently connected music provider, false otherwise
- Return type
-
classmethod
get_current_position
() → Timespan or None¶ Gets the current playback position of the currently selected track
-
classmethod
get_current_track_metadata
() → MagicLeapMusicServiceTrackMetadata or None¶ Gets the currently selected track’s metadata
- Returns
True if retrieving the current track metadata succeeded
metadata (MagicLeapMusicServiceTrackMetadata): Metadata of the currently selected track
- Return type
-
classmethod
get_playback_repeat_state
() → MagicLeapMusicServicePlaybackRepeatState or None¶ Gets the current repeat state of the music service provider
- Returns
True if retrieving the repeat state succeeds
repeat_state (MagicLeapMusicServicePlaybackRepeatState): The repeat state the music service provider is currently set to
- Return type
-
classmethod
get_playback_shuffle_state
() → MagicLeapMusicServicePlaybackShuffleState or None¶ Gets the current playback shuffle state
- Returns
True if retrieving the shuffle state succeeded
shuffle_state (MagicLeapMusicServicePlaybackShuffleState): The current playback shuffle state the music provider is set to.
- Return type
-
classmethod
get_playback_state
() → MagicLeapMusicServicePlaybackState or None¶ Gets the current playback state of the music service provider
- Returns
True if retreiving the playback state succeeded
playback_state (MagicLeapMusicServicePlaybackState):
- Return type
-
classmethod
get_playback_volume
() → float or None¶ Gets the volume of playback the music service provider is currently set to
-
classmethod
get_service_provider_error
() → (error_type=MagicLeapMusicServiceProviderError, error_code=int32) or None¶ Gets the current error status of the music service provider. If no error has occurred then this will return the error type ‘None’
- Returns
True if retreiving the providers error has succeeded
error_type (MagicLeapMusicServiceProviderError):
error_code (int32):
- Return type
tuple or None
-
classmethod
get_service_status
() → MagicLeapMusicServiceStatus or None¶ Gets the current service status of the music service provider
- Returns
True if retrieving the service status of the current music service provider succeeded
status (MagicLeapMusicServiceStatus): Current service status of the music service provider
- Return type
-
classmethod
get_track_length
() → Timespan or None¶ Gets the length of the currently selected track
-
classmethod
next_track
() → bool¶ Advances to the next track on the music service provider’s playlist.
- Returns
True if advancing to the next track succeded
- Return type
-
classmethod
pause_playback
() → bool¶ Pauses playback of the currently selected track.
- Returns
True if playback paused successfully
- Return type
-
classmethod
previous_track
() → bool¶ Rewinds to the previous track on the music provider’s playlist
- Returns
True if rewind to the previous track succeded
- Return type
-
classmethod
resume_playback
() → bool¶ Resumes playback of the currently selected track.
- Returns
True if playback resumed successfully
- Return type
-
classmethod
set_authentication_string
(authentication_string) → bool¶ Sets the authentication string used to connect to the music service provider
-
classmethod
set_callbacks
(callbacks) → bool¶ Sets callbacks the music service provider will utilize.
- Parameters
callbacks (MagicLeapMusicServiceCallbacks) –
- Returns
True if successful in setting the music service callbacks, false otherwise
- Return type
-
classmethod
set_playback_repeat_state
(repeat_state) → bool¶ Sets the repeat state of the music service provider
- Parameters
repeat_state (MagicLeapMusicServicePlaybackRepeatState) – Repeat state to set the music service provider to
- Returns
True if setting the repeat state to ‘RepeatState’ succeeded
- Return type
-
classmethod
set_playback_shuffle_state
(shuffle_state) → bool¶ Sets the current playback shuffle state
- Parameters
shuffle_state (MagicLeapMusicServicePlaybackShuffleState) – The shuffle type to set the current shuffle state to.
- Returns
True if setting the shuffle state to ‘ShuffleState’ succeeds
- Return type
-
classmethod
set_playback_url
(playback_url) → bool¶ Sets the URL to playback using the music service provider
-
classmethod
set_playback_volume
(volume) → bool¶ Sets the volume of playback by the music service provider