fantata/laravel-pod-player

Laravel component to play an audio file, built with podcasts in mind.

Installs: 57

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:CSS

Type:project

0.1 2023-07-05 17:18 UTC

This package is auto-updated.

Last update: 2024-04-05 18:50:17 UTC


README

Laravel component HTML5 audio player, built with podcasts in mind.

Adapted from this CSS Tricks tutorial

Installation

composer require fantata/laravel-pod-player

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

Add the JS and CSS to your template:

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

And finally, call the component, e.g.

<x-laravel-audio-player
    audioUrl="audio.mp3"
    imgUrl="cover.jpg"
    epId="1"
    epTitle="Greatest Cheeses of All Time"
    epDate="20th Jan 2023"
    showTitle="The Amazing Things Podcast"
/>

audioUrl is the only required attribute.