Custom JS is not working in custom view page in RelationshipManager

So the case is this 1. We use video js using CDN What I did on my adminPanelProvider I register the CDN
public function boot(): void
{
FilamentAsset::register([
Js::make('video-js', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js'),
Js::make('videojs-contrib-eme', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js'),
Css::make('video-css', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css'),
]);

}
public function boot(): void
{
FilamentAsset::register([
Js::make('video-js', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js'),
Js::make('videojs-contrib-eme', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js'),
Css::make('video-css', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css'),
]);

}
and on the custom view for (EpisodesRelationManger) infolist, I want to include the custom scripts
public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
View::make('filament.pages.series.episodes.video')
->columnSpanFull()
->viewData(['drmData' => $this->drmData])
]);
}
public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
View::make('filament.pages.series.episodes.video')
->columnSpanFull()
->viewData(['drmData' => $this->drmData])
]);
}
This the custom view video.blade.php (The below scripts is not seen in devtools elements)
@if($getRecord())

<div class="h-screen flex justify-center gap-3 w-full">
<div class="h-screen aspect-video ">
<video id="video-player" class="video-js vjs-default-skin vjs-16-9" controls data-setup="{}" />
</div>
</div>
@push('scripts')
<script>
var drmData = {!! json_encode($drmData, JSON_HEX_TAG) !!};
</script>
<script type="text/javascript" src="{{ asset('js/pallycon-helper.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/video-player.js') }}"></script>
@endpush
@endif
@if($getRecord())

<div class="h-screen flex justify-center gap-3 w-full">
<div class="h-screen aspect-video ">
<video id="video-player" class="video-js vjs-default-skin vjs-16-9" controls data-setup="{}" />
</div>
</div>
@push('scripts')
<script>
var drmData = {!! json_encode($drmData, JSON_HEX_TAG) !!};
</script>
<script type="text/javascript" src="{{ asset('js/pallycon-helper.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/video-player.js') }}"></script>
@endpush
@endif
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server