var samplePlaylist = [{
sources: [{
src: 'http://media.w3.org/2010/05/sintel/trailer.mp4',
type: 'video/mp4'
}]
}, {
sources: [{
src: 'http://media.w3.org/2010/05/bunny/trailer.mp4',
type: 'video/mp4'
}]
}];
$list = [];
foreach ($videos as $video){
$list[] = [
'sources' => [
'src' => $video->getFirstMediaUrl('videos'),
'type' =>'video/mp4',
]];
}