2023-07-04 18:19:06 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace danog\MadelineProto\EventHandler\Media;
|
|
|
|
|
|
|
|
use danog\MadelineProto\EventHandler\Media;
|
2023-07-05 21:28:17 +02:00
|
|
|
use danog\MadelineProto\MTProto;
|
2023-07-04 18:19:06 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a generic audio file.
|
|
|
|
*/
|
|
|
|
abstract class AbstractAudio extends Media
|
|
|
|
{
|
2023-07-04 19:48:23 +02:00
|
|
|
/** Audio duration in seconds */
|
2023-07-04 18:19:06 +02:00
|
|
|
public readonly int $duration;
|
2023-07-04 19:48:23 +02:00
|
|
|
|
|
|
|
/** @internal */
|
|
|
|
public function __construct(
|
|
|
|
MTProto $API,
|
|
|
|
array $rawMedia,
|
2023-07-11 19:43:31 +02:00
|
|
|
array $audioAttribute,
|
|
|
|
bool $protected,
|
2023-07-04 19:48:23 +02:00
|
|
|
) {
|
2023-07-11 19:43:31 +02:00
|
|
|
parent::__construct($API, $rawMedia, $protected);
|
2023-07-04 19:48:23 +02:00
|
|
|
$this->duration = $audioAttribute['duration'];
|
|
|
|
}
|
2023-07-04 18:19:06 +02:00
|
|
|
}
|