Codecbase
CodecBase ¶
The base class of the codec.
Parameters
Parameter | Default | Description |
---|---|---|
path
str
|
required | File path (optional file path). |
bitrate
instance-attribute
¶
The number of bits per second of playback (determines the sound quality).
codec_name
class-attribute
instance-attribute
¶
The name of the codec (abbreviation).
codec_priority
class-attribute
instance-attribute
¶
Sorting priority (the lower the value, the earlier it will be processed, checked for compatibility and initialized)
hidden_name
class-attribute
instance-attribute
¶
Hide the name
when displayed in the SeaPlayer.
__aio_sha1__
async
¶
__headrepr__ ¶
The display name in the SeaPlayer.
Returns
Name | Type | Description |
---|---|---|
str |
str
|
Value |
__namerepr__ ¶
The name that is displayed for the place self.name
.
Returns
Name | Type | Description |
---|---|---|
str |
str
|
Value |
__sha1__ ¶
aio_is_this_codec
async
staticmethod
¶
get_pos ¶
Getting the audio playback position in seconds.
Returns
Name | Type | Description |
---|---|---|
float |
float
|
The position of the audio playback in seconds. |
get_volume ¶
Getting the current volume as a percentage.
Returns
Name | Type | Description |
---|---|---|
float |
float
|
Volume percentage (0.01 == 1%). |
is_this_codec
staticmethod
¶
set_pos ¶
Setting the audio playback position in seconds.
Parameters
Parameter | Default | Description |
---|---|---|
value
float
|
required | The position of the audio playback in seconds. |