MediaOpener
in package
uses
ForwardsCalls
Tags
Table of Contents
Properties
- $collection : MediaCollection
- $disk : Disk
- $driver : PHPFFMpeg
- $timecode : TimeCode
Methods
- __call() : MediaOpener|void
- Forwards all calls to the underlying driver.
- __construct() : mixed
- Uses the 'filesystems.default' disk from the config if none is given.
- __invoke() : AbstractMediaType
- Returns the Media object from the driver.
- cleanupTemporaryFiles() : self
- clone() : self
- each() : self
- export() : MediaExporter
- Returns an instance of MediaExporter with the driver and timecode (if set).
- exportForHLS() : HLSExporter
- Returns an instance of HLSExporter with the driver forced to AdvancedMedia.
- exportFramesByAmount() : MediaExporter
- exportFramesByInterval() : MediaExporter
- exportTile() : MediaExporter
- Returns an instance of MediaExporter with a TileFilter and ImageFormat.
- fromDisk() : self
- Set the disk to open files from.
- fromFilesystem() : self
- Alias for 'fromDisk', mostly for backwards compatibility.
- get() : MediaCollection
- getAdvancedDriver() : PHPFFMpeg
- Forces the driver to open the collection with the `openAdvanced` method.
- getDriver() : PHPFFMpeg
- getFrameFromSeconds() : self
- Shortcut to set the timecode by seconds.
- getFrameFromString() : self
- Shortcut to set the timecode by string.
- getFrameFromTimecode() : self
- open() : self
- Instantiates a Media object for each given path.
- openUrl() : self
- Instantiates a MediaOnNetwork object for each given url.
- openWithInputOptions() : self
- Instantiates a single Media object and sets the given options on the object.
- makeLocalDiskFromPath() : Disk
Properties
$collection
private
MediaCollection
$collection
$disk
private
Disk
$disk
$driver
private
PHPFFMpeg
$driver
$timecode
private
TimeCode
$timecode
Methods
__call()
Forwards all calls to the underlying driver.
public
__call(mixed $method, mixed $arguments) : MediaOpener|void
Parameters
- $method : mixed
- $arguments : mixed
Return values
MediaOpener|void__construct()
Uses the 'filesystems.default' disk from the config if none is given.
public
__construct([mixed $disk = null ][, PHPFFMpeg|null $driver = null ][, MediaCollection|null $mediaCollection = null ]) : mixed
Gets the underlying PHPFFMpeg instance from the container if none is given. Instantiates a fresh MediaCollection if none is given.
Parameters
- $disk : mixed = null
- $driver : PHPFFMpeg|null = null
- $mediaCollection : MediaCollection|null = null
__invoke()
Returns the Media object from the driver.
public
__invoke() : AbstractMediaType
Return values
AbstractMediaTypecleanupTemporaryFiles()
public
cleanupTemporaryFiles() : self
Return values
selfclone()
public
clone() : self
Return values
selfeach()
public
each(mixed $items, callable $callback) : self
Parameters
- $items : mixed
- $callback : callable
Return values
selfexport()
Returns an instance of MediaExporter with the driver and timecode (if set).
public
export() : MediaExporter
Return values
MediaExporterexportForHLS()
Returns an instance of HLSExporter with the driver forced to AdvancedMedia.
public
exportForHLS() : HLSExporter
Return values
HLSExporterexportFramesByAmount()
public
exportFramesByAmount(int $amount[, int|null $width = null ][, int|null $height = null ][, int|null $quality = null ]) : MediaExporter
Parameters
- $amount : int
- $width : int|null = null
- $height : int|null = null
- $quality : int|null = null
Return values
MediaExporterexportFramesByInterval()
public
exportFramesByInterval(float $interval[, int|null $width = null ][, int|null $height = null ][, int|null $quality = null ]) : MediaExporter
Parameters
- $interval : float
- $width : int|null = null
- $height : int|null = null
- $quality : int|null = null
Return values
MediaExporterexportTile()
Returns an instance of MediaExporter with a TileFilter and ImageFormat.
public
exportTile(callable $withTileFactory) : MediaExporter
Parameters
- $withTileFactory : callable
Return values
MediaExporterfromDisk()
Set the disk to open files from.
public
fromDisk(mixed $disk) : self
Parameters
- $disk : mixed
Return values
selffromFilesystem()
Alias for 'fromDisk', mostly for backwards compatibility.
public
fromFilesystem(Filesystem $filesystem) : self
Parameters
- $filesystem : Filesystem
Return values
selfget()
public
get() : MediaCollection
Return values
MediaCollectiongetAdvancedDriver()
Forces the driver to open the collection with the `openAdvanced` method.
public
getAdvancedDriver() : PHPFFMpeg
Return values
PHPFFMpeggetDriver()
public
getDriver() : PHPFFMpeg
Return values
PHPFFMpeggetFrameFromSeconds()
Shortcut to set the timecode by seconds.
public
getFrameFromSeconds(float $seconds) : self
Parameters
- $seconds : float
Return values
selfgetFrameFromString()
Shortcut to set the timecode by string.
public
getFrameFromString(string $timecode) : self
Parameters
- $timecode : string
Return values
selfgetFrameFromTimecode()
public
getFrameFromTimecode(TimeCode $timecode) : self
Parameters
- $timecode : TimeCode
Return values
selfopen()
Instantiates a Media object for each given path.
public
open(mixed $paths) : self
Parameters
- $paths : mixed
Return values
selfopenUrl()
Instantiates a MediaOnNetwork object for each given url.
public
openUrl(mixed $paths[, array<string|int, mixed> $headers = [] ]) : self
Parameters
- $paths : mixed
- $headers : array<string|int, mixed> = []
Return values
selfopenWithInputOptions()
Instantiates a single Media object and sets the given options on the object.
public
openWithInputOptions(string $path[, array<string|int, mixed> $options = [] ]) : self
Parameters
- $path : string
- $options : array<string|int, mixed> = []
Return values
selfmakeLocalDiskFromPath()
private
static makeLocalDiskFromPath(string $path) : Disk
Parameters
- $path : string