Nova Video
  • 🏁Getting Started
    • Introduction
    • Installation
    • Support Us
    • License
  • 🚀Usage
    • Basic Usage
    • Usage with Larupload
    • Notes
  • ⚙️Advanced Usage
    • Video Metadata
    • Rest API Usage (Larupload)
    • Video Field Options
      • Make
      • Store With Larupload
      • Player Mode
      • Player Type
      • Direction (dir)
      • Max Height
      • Hide Cover Uploader
    • Configuration
      • UI
        • Player
          • Type
          • Direction (dir)
          • Max Height
      • Cover Uploader
      • Player Mode
  • ⚪Other
    • Demo
Powered by GitBook
On this page
Edit on GitHub
  1. Advanced Usage
  2. Video Field Options

Direction (dir)

dir

Argument
Type
Required
Accepted Values

dir

enum

LTR, RTL

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),
        ];
    }
}

PreviousPlayer TypeNextMax Height

Last updated 1 year ago

⚙️