I try to read multiple videos, but I encountered a problem when loading them, the problem is that the browser crash and the loading time of all videos is very long, I dont know if it is possible to display only the title and an image of every video,,, After that when the user wants to watch a specific video, in this case he load this video and watch it in streaming mode, but not loading them all at the same time (is there any soft/smart solution for that)
this is the Controller methode :
public function videos()
{
$videos = Video::all();
return view("videos", compact('videos'));
}
this is the view blade :
<div class="row">
@foreach ($videos as $v)
<div class="col-lg-4">
<div class="card">
<video class="video" controls>
<source src="{{URL::asset("/videos/upload/$v->file_name")}}" type="video/mp4">
</video>
</div>
<div class="card-title">
{{ $v->title }}
</div>
</div>
@endforeach