@php $watermark_type = get_player_settings('watermark_type'); @endphp @if ($watermark_type == 'js') @include('course_player.watermark') @endif @include('course_player.player_page')
@if ($lesson_details->lesson_type == 'text' && $lesson_details->attachment_type == 'text')
{!! removeScripts($lesson_details->attachment) !!}
@elseif ($lesson_details->lesson_type == 'video-url')
@include('frontend.course_player.player_config') @elseif($lesson_details->lesson_type == 'image')
@php // $img = asset('uploads/lesson_file/attachment/' . $lesson_details->attachment); $img = route('course.get_file', ['course_id' => $lesson_details->course_id, 'lesson_id' => $lesson_details->id]) @endphp
@elseif($lesson_details->lesson_type == 'google_drive') @php $video_url = trim($lesson_details->lesson_src); // Extract Google Drive file ID reliably from standard share links preg_match('/\/d\/([a-zA-Z0-9_-]+)/', $video_url, $matches); $video_id = $matches[1] ?? null; @endphp @if($video_id)
@include('frontend.course_player.player_config') @else
Invalid Google Drive Link

Could not extract video ID.

Use a link like:
https://drive.google.com/file/d/FILE_ID/view
@endif @elseif($lesson_details->lesson_type == 'html5')
@include('frontend.course_player.player_config') @elseif($lesson_details->lesson_type == 'document_type')
@if ($lesson_details->attachment_type == 'pdf') @elseif($lesson_details->attachment_type == 'doc') @elseif($lesson_details->attachment_type == 'txt') @endif
@else
@endif