Looking to hire Laravel developers? Try LaraJobs

laravel-media-player maintained by luria

Description
Laravel component to add simple audio/video player.
Author
Last update
2024/09/20 18:35 (dev-main)
License
Links
Downloads
8

Comments
comments powered by Disqus

IN DEVELPOMNET STAGE. DO NOT USE. IT WILL NOT WORK

Laravel Media Player

Laravel component HTML5 simple audio/video player.

Installation

composer require luria/laravel-media-player

php artisan vendor:publish --tag=public --force

Add the JS and CSS to your template:

<link rel="stylesheet" href="<?php echo asset('vendor/luria/css/laravelMediaPlayer.css')?>" type="text/css">
<script src="<?php echo asset('vendor/luria/js/laravelMediaPlayer.js')?>"></script>

Call the component, e.g.

<x-laravel-media-player
    mediaUrl="mysong.mp3"
    mediaType="audio"
    coverUrl="mySongCover.jpg"
    mediaId="1"
    mediaTitle="I like beer!!"
    mediaDate="20th Jan 2024"
/>

mediaUrl and mediaType are the only mandatory attribute.