getRecord(); $field = $this->getName(); if (! $record) { return $this->wrapEmbeddedHtml('-'); } $files = $record->{$field} ?? []; $files = is_array($files) ? array_filter($files) : []; if (empty($files)) { return $this->wrapEmbeddedHtml('-'); } $html = view('filament.infolists.media-player-embed', [ 'patientId' => $record->id, 'field' => $field, ])->render(); return $this->wrapEmbeddedHtml($html); } }