Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Audio

Открытые члены

 __construct ()
 
 withValue ($value)
 
 withJsonString ($json)
 
 withMessageCode ($messageCode=null)
 
 withFile ($fileId=null)
 
 withPreset ($presetName=null)
 
 createdFromPreset ()
 
 getFileUrl ($useAbsoluteUrl=false)
 
 getDbValue ()
 
 getDefaultFileUrl ()
 
 getFileId ()
 
 getPreset ()
 
 getMessageCode ()
 
 getDuration ()
 

Открытые статические члены

static create ()
 

Открытые атрибуты

const AUDIO_TYPE_PRESET = 'preset'
 
const AUDIO_TYPE_FILE = 'file'
 

Защищенные члены

 getPresetFileDuration ($presetCode)
 
 getMp3fileDuration ($fileId)
 

Подробное описание

См. определение в файле audio.php строка 21

Конструктор(ы)

◆ __construct()

__construct ( )

SpeechRate constructor.

См. определение в файле audio.php строка 49

Методы

◆ create()

static create ( )
static

Create instance.

Возвращает
static

См. определение в файле audio.php строка 41

◆ createdFromPreset()

createdFromPreset ( )

Does audio created from a preset

Возвращает
bool

См. определение в файле audio.php строка 151

◆ getDbValue()

getDbValue ( )

Get value for db (as json string)

Возвращает
bool|string
Исключения
ArgumentException

См. определение в файле audio.php строка 187

◆ getDefaultFileUrl()

getDefaultFileUrl ( )

Get default audio preset url for player.

Возвращает
string

См. определение в файле audio.php строка 212

◆ getDuration()

getDuration ( )

get duration of current audio

Возвращает
integer

См. определение в файле audio.php строка 249

◆ getFileId()

getFileId ( )

Get file id

Возвращает
string

См. определение в файле audio.php строка 222

◆ getFileUrl()

getFileUrl ( $useAbsoluteUrl = false)

Get audio file url

Аргументы
bool$useAbsoluteUrlForce using absolute url.
Возвращает
bool|string|null
Исключения

Bitrix\Main\ArgumentNullException

Исключения

Bitrix\Main\ArgumentOutOfRangeException

См. определение в файле audio.php строка 163

◆ getMessageCode()

getMessageCode ( )

Get message code

Возвращает
string

См. определение в файле audio.php строка 240

◆ getMp3fileDuration()

getMp3fileDuration ( $fileId)
protected

Get mp3 file duration

Аргументы
int$fileIdFile id.
Возвращает
int

См. определение в файле audio.php строка 290

◆ getPreset()

getPreset ( )

Get preset code

Возвращает
string

См. определение в файле audio.php строка 231

◆ getPresetFileDuration()

getPresetFileDuration ( $presetCode)
protected

Get preset audio duration

Аргументы
string$presetCodePreset code.
Возвращает
bool

См. определение в файле audio.php строка 270

◆ withFile()

withFile ( $fileId = null)

With file.

Аргументы
string$fileIdFile id.
Возвращает
$this

См. определение в файле audio.php строка 127

◆ withJsonString()

withJsonString ( $json)

With json value.

Аргументы
string$jsonValue as json string from DB.
Возвращает
$this

См. определение в файле audio.php строка 81

◆ withMessageCode()

withMessageCode ( $messageCode = null)

With message code.

Аргументы
string$messageCodeMessage code.
Возвращает
$this

См. определение в файле audio.php строка 114

◆ withPreset()

withPreset ( $presetName = null)

With preset.

Аргументы
string$presetNamePreset code.
Возвращает
$this

См. определение в файле audio.php строка 140

◆ withValue()

withValue ( $value)

With value.

Аргументы
string$valueValue from user interface.
Возвращает
$this

См. определение в файле audio.php строка 59

Данные класса

◆ AUDIO_TYPE_FILE

const AUDIO_TYPE_FILE = 'file'

См. определение в файле audio.php строка 24

◆ AUDIO_TYPE_PRESET

const AUDIO_TYPE_PRESET = 'preset'

См. определение в файле audio.php строка 23