Direction (dir)

dir

The dir option allows you to define the layout direction of the video player when displaying videos using the vidstack player.

<?php

namespace App\Nova;

use Illuminate\Http\Request;
use Laravel\Nova\Fields\ID;
use Mostafaznv\NovaVideo\Enums\NovaVideoPlayerDirection;
use Mostafaznv\NovaVideo\Video;
use App\Models\Media as MediaModel;


class Media extends Resource
{
    public static string $model = MediaModel::class;


    public function fields(Request $request): array
    {
        return [
            ID::make()->sortable(),

            Video::make(trans('Video'), 'video')
                ->storeWithLarupload()
                ->dir(NovaVideoPlayerDirection::LTR),
        ];
    }
}

Last updated