<?php

declare(strict_types=1);

namespace App\Framework\Http\Streaming;

enum StreamingFormat: string
{
    case HLS = 'hls';
    case DASH = 'dash';

    public function getContentType(): string
    {
        return match ($this) {
            self::HLS => 'application/vnd.apple.mpegurl',
            self::DASH => 'application/dash+xml'
        };
    }

    public function getFileExtension(): string
    {
        return match ($this) {
            self::HLS => 'm3u8',
            self::DASH => 'mpd'
        };
    }
}
