PHP code example of rhyslees / nova-audio

1. Go to this page and download the library: Download rhyslees/nova-audio library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rhyslees / nova-audio example snippets


use RhysLees\NovaAudio\Audio;

public function fields(Request $request)
{
    return [
        ...
        Audio::make('Audio')
            ->disk('public'),
        ...
    ];
}

    /**
     * Preloads the audio for instant playback.
     */
    ->preload($value = 'auto')

    /**
     * Instructs the field to autoplay the audio.
     */
    ->autoplay($value = true)

    /**
     * Show the playback speed controls for the audio field.
     */
    ->playbackRate($value = true)