Skip to content

SeaPlayer

SeaPlayer

SeaPlayer(*args, **kwargs)

Bases: App

cache class-attribute instance-attribute

cache = Cacher(CACHE_DIRPATH)

An image of a class for caching variables.

config class-attribute instance-attribute

config = SeaPlayerConfig(CONFIG_FILEPATH)

The image of the SeaPlayer configuration file.

currect_sound class-attribute instance-attribute

currect_sound = None

The currently selected sound.

currect_sound_index class-attribute instance-attribute

currect_sound_index = None

The index of the currently selected sound.

currect_volume class-attribute instance-attribute

currect_volume = cache.var('currect_volume', 1.0)

The current volume value (cached).

ll class-attribute instance-attribute

ll = LanguageLoader(LANGUAGES_DIRPATH, config.lang)

An image of the class for receiving the loaded SeaPlayer translation. With the translation uploaded from the seaplayer/langs/ directory.

playback_mode class-attribute instance-attribute

playback_mode = cache.var('playback_mode', 0)

The current playback mode (cached).

action_quit async

action_quit()

The function called by our when the SeaPlayer stops working.

aio_callnofy async

aio_callnofy(text, dosk='top')

Creating a notification.

Parameters
Parameter Default Description
text
str
required

The text of the notification.

dosk
Literal['bottom', 'left', 'right', 'top']
'top'

Regarding the screen. Defaults to "top".

Returns
Name Type Description
CallNofy CallNofy

To delete the notification image, use the CallNofy.remove() method.

aio_gcs async

aio_gcs()

Getting the currently selected sound.

Returns
Type Description
Optional[CodecBase]

Optional[CodecBase]: The image of the codec in which the sound is wrapped.

aio_get_sound_selected_label_text async

aio_get_sound_selected_label_text(sound=None)

Generating a string for self.music_selected_label.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

The image of the codeс in which the sound is wrapped. Defaults to None.

Returns
Name Type Description
str str

String for self.music_selected_label.

aio_nofy async

aio_nofy(text, life_time=3, dosk='top')

Creating a temporary notification.

Parameters
Parameter Default Description
text
str
required

The text of the notification.

life_time
float
3

The time in seconds after which the notification will disappear. Defaults to 3.

dosk
Literal['bottom', 'left', 'right', 'top']
'top'

Regarding the screen. Defaults to "top".

aio_update_currect_sound async

aio_update_currect_sound()

Updating local variables of the current sound.

aio_update_select_image async

aio_update_select_image(sound)

Forced image update.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
required

The current sound.

aio_update_select_label async

aio_update_select_label(sound=None)

Updating the string in self.music_selected_label.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

The image of the codeс in which the sound is wrapped. Defaults to None.

callnofy

callnofy(text, dosk='top')

Creating a notification.

Parameters
Parameter Default Description
text
str
required

The text of the notification.

dosk
Literal['bottom', 'left', 'right', 'top']
'top'

Regarding the screen. Defaults to "top".

Returns
Name Type Description
CallNofy CallNofy

To delete the notification image, use the CallNofy.remove() method.

currect_sound_pause async

currect_sound_pause(sound=None)

Pauses the currently selected sound.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

Сurrently selected sound. Defaults to None.

currect_sound_play async

currect_sound_play(sound=None)

Plays playback of the currently selected sound.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

Сurrently selected sound. Defaults to None.

currect_sound_stop async

currect_sound_stop(sound=None)

Stops playback of the currently selected sound.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

Сurrently selected sound. Defaults to None.

currect_sound_unpause async

currect_sound_unpause(sound=None)

Unpauses the currently selected sound.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

Сurrently selected sound. Defaults to None.

gcs

gcs()

Getting the currently selected sound.

Returns
Type Description
Optional[CodecBase]

Optional[CodecBase]: The image of the codec in which the sound is wrapped.

get_sound_selected_label_text

get_sound_selected_label_text(sound=None)

Generating a string for self.music_selected_label.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

The image of the codeс in which the sound is wrapped. Defaults to None.

Returns
Name Type Description
str str

String for self.music_selected_label.

get_sound_tstatus

get_sound_tstatus(sound)

Getting the audio status in text format in the language selected by the user.

Parameters
Parameter Default Description
sound
CodecBase
required

The image of the codeс in which the sound is wrapped.

Returns
Name Type Description
str str

Audio status in text format in the language selected by the user.

nofy

nofy(text, life_time=3, dosk='top')

Creating a temporary notification.

Parameters
Parameter Default Description
text
str
required

The text of the notification.

life_time
float
3

The time in seconds after which the notification will disappear. Defaults to 3.

dosk
Literal['bottom', 'left', 'right', 'top']
'top'

Regarding the screen. Defaults to "top".

on_ready

on_ready(*args, **kwargs)

A function called when the SeaPlayer is completely confused.

update_select_label

update_select_label(sound=None)

Updating the string in self.music_selected_label.

Parameters
Parameter Default Description
sound
Optional[CodecBase]
None

The image of the codeс in which the sound is wrapped. Defaults to None.