class Video extends VolumeFile

Traits

HasFactory

Constants

MIMES

Allowed video MIME types.

CODECS

Allowed video codecs.

ERROR_NOT_FOUND

Error if a video cannot be found.

ERROR_MIME_TYPE

Error if a video has an invalid MIME type.

ERROR_CODEC

Error if a video has an invalid codec.

ERROR_MALFORMED

Error if a video cannot be parsed.

ERROR_TOO_LARGE

Error if a video file is too large.

ERROR_INVALID_MOOV_POS

Error if moov atom is not located at beginning.

Properties

int $id from  VolumeFile
int $volume_id from  VolumeFile
string $filename from  VolumeFile
string $uuid from  VolumeFile

Methods

setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

string
getUrlAttribute()

Adds the url attribute to the model. The url is the absolute path to the original file.

string
getUrl()

Get the file URL.

VolumeFile>
volume()

The volume this video belongs to.

setMetadataAttribute(array|null $value)

Set the metadata attribute.

array|null
getMetadataAttribute()

Get the metadata attribute.

setWidthAttribute(int $value)

Set the width attribute.

int|null
getWidthAttribute()

Get the width attribute.

setHeightAttribute(int $value)

Set the height attribute.

int|null
getHeightAttribute()

Get the height attribute.

setSizeAttribute(int $value)

Set the size attribute.

int|null
getSizeAttribute()

Get the size attribute.

string
getMimeTypeAttribute()

Get the mimeType attribute.

setMimeTypeAttribute(string $value)

Set the mimeType attribute.

string
getThumbnailUrlAttribute()

URL to the thumbnail of this video.

VolumeFileLabel, $this>
labels()

The labels, this video got attached by the users.

Annotation, $this>
annotations()

The annotations that belong to this video.

array
casts()

Get the attributes that should be cast.

string
getThumbnailAttribute()

Thumbnail string of this video. Use with the thumbnail_url helper function.

Collection
getThumbnailsAttribute()

Thumbnails array of this video. Use with the thumbnail_url helper function.

Collection
getThumbnailsUrlAttribute()

URLs to the thumbnails of this video.

int|null
getErrorAttribute()

Get the error attribute.

setErrorAttribute(int|null $value)

Set the error attribute.

bool
hasBeenProcessed()

Determine whether the (new) video has been processed.

setTakenAtAttribute(array|null $value)

Set the taken_at timestamps.

array|null
getTakenAtAttribute()

Get the taken_at timestamps.

Details

in HasJsonAttributes at line 16
protected setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $value

Value of the attribute in the JSON.

string $attrs

Name of the JSON column of the model.

in HasJsonAttributes at line 38
protected mixed getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $default

Default value.

string $attrs

Name of the JSON column of the model.

Return Value

mixed

in VolumeFile at line 28
string getUrlAttribute()

Adds the url attribute to the model. The url is the absolute path to the original file.

Return Value

string

in VolumeFile at line 36
string getUrl()

Get the file URL.

This may be a remote URL starting with "http://" or "https://", or a storage disk path starting with "[disk-name]://".

Return Value

string

in VolumeFile at line 46
VolumeFile> volume()

The volume this video belongs to.

Return Value

VolumeFile>

in VolumeFile at line 54
setMetadataAttribute(array|null $value)

Set the metadata attribute.

Parameters

array|null $value

in VolumeFile at line 62
array|null getMetadataAttribute()

Get the metadata attribute.

Return Value

array|null

in VolumeFile at line 72
setWidthAttribute(int $value)

Set the width attribute.

Parameters

int $value

in VolumeFile at line 82
int|null getWidthAttribute()

Get the width attribute.

Return Value

int|null

in VolumeFile at line 92
setHeightAttribute(int $value)

Set the height attribute.

Parameters

int $value

in VolumeFile at line 102
int|null getHeightAttribute()

Get the height attribute.

Return Value

int|null

in VolumeFile at line 112
setSizeAttribute(int $value)

Set the size attribute.

Parameters

int $value

in VolumeFile at line 122
int|null getSizeAttribute()

Get the size attribute.

Return Value

int|null

in VolumeFile at line 132
string getMimeTypeAttribute()

Get the mimeType attribute.

Return Value

string

in VolumeFile at line 142
setMimeTypeAttribute(string $value)

Set the mimeType attribute.

Parameters

string $value

at line 128
string getThumbnailUrlAttribute()

URL to the thumbnail of this video.

Return Value

string

at line 189
VolumeFileLabel, $this> labels()

The labels, this video got attached by the users.

Return Value

VolumeFileLabel, $this>

at line 106
Annotation, $this> annotations()

The annotations that belong to this video.

Return Value

Annotation, $this>

at line 91
protected array casts()

Get the attributes that should be cast.

Return Value

array

at line 116
string getThumbnailAttribute()

Thumbnail string of this video. Use with the thumbnail_url helper function.

Return Value

string

at line 138
Collection getThumbnailsAttribute()

Thumbnails array of this video. Use with the thumbnail_url helper function.

Return Value

Collection

at line 149
Collection getThumbnailsUrlAttribute()

URLs to the thumbnails of this video.

Return Value

Collection

at line 159
int|null getErrorAttribute()

Get the error attribute.

Return Value

int|null

at line 169
setErrorAttribute(int|null $value)

Set the error attribute.

Parameters

int|null $value

at line 179
bool hasBeenProcessed()

Determine whether the (new) video has been processed.

Return Value

bool

at line 199
setTakenAtAttribute(array|null $value)

Set the taken_at timestamps.

Parameters

array|null $value

at line 215
array|null getTakenAtAttribute()

Get the taken_at timestamps.

Return Value

array|null