Download the PHP package hugomyb/filament-media-action without Composer

On this page you can find all versions of the php package hugomyb/filament-media-action. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-media-action

▶️ Filament Media Action

Latest Version on Packagist Total Downloads

Automatically display your media (video, audio, pdf, image, ...) with an action in Filament. The package automatically detects the media extension to display the correct player.

Examples

example1 example2 example3 example4 example5 example6 example7

Installation

You can install the package via composer:

Optionally, you can publish the view using

Optionally, you can publish the translations using

Usage

Basic Usage

Like a classic Filament Action, you can use MediaAction anywhere (Forms, Tables, Infolists, Suffix and prefix, ...).

Simply provide the url of your media in the ->media() method. The package will then automatically detect your media extension for display.

Available options

Autoplay

You can enable autoplay for video and audio by using the ->autoplay() method.

You can also pass a closure in the method and access $record and $mediaType :

$mediatype can return "youtube", "audio", "video", "image" or "pdf".

Preload

To control the preload behavior, use the ->preload() method. By default, it is set to true, which means the media will preload automatically. You can set it to false to disable preloading (this is helpful to avoid "Autoplay failed or was blocked" errors in some browsers).

Other options

You can customize the modal as you wish in the same way as a classic action (see https://filamentphp.com/docs/3.x/actions/modals).

If there is an existing record, you can access it by passing a closure to ->media() method.

Example :

As shown in the example above, you can chain MediaActions together with ->extraModalFooterActions() method.

Customizing the modal view

You can customize the modal view by publishing the view using :

Then, in the view, you can access :

Supported media extensions

Type Extensions
Video mp4, avi, mov, webm
Audio mp3, wav, ogg, aac
Documents pdf
Image jpg, jpeg, png, gif, bmp, svg, webp

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-media-action with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hugomyb/filament-media-action contains the following files

Loading the files please wait ....