I have built a Laravel app as follow,
Controller -> Retrieves few audio files path and sends it to view.
View -> Renders audio element with src attribute with files path obtained from controller.
I am able to play, pause. But unable to seek in chrome. Seek works fine in Firefox. I got a hint from another stackoverflow response (HTML5 video will not loop) it is because that chrome get the content as partial content. How to resolve this in chrome ?
// Controller
public function showSamples(){
$samples = Sample::where('artist_id', '=', Auth::user()->id));
return View::make('artist.samples', $samples);
}
// View [artists.sample]
@foreach($samples as $sample)
<audio src="/uploads/samples/{{ $sample->file_path }}" controls>
</audio>
@endforeach