You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a laravel project integrating a VOD part, I'm trying to dynamically load content, using the Youtube video ID to create a new player, destroy the old one and dynamically load it in modals so that every time If you click on a thumbnail, load this content dynamically, but so far I have not been successful in doing this process. I saw someone try to do the same in angular, but in the documentation so far I only find references to dispose in version 1.0.
Example.
<divclass="row"><divclass="col"><!-- Reproductor principal --><divclass="row justify-content-center"><divclass="col col-content"><divclass="row"> </div><divclass="embed-responsive embed-responsive-16by9"><divid="player" class="embed-responsive-item"><vm-playerid="main-player" :key="videoKey"><!-- Provider component is placed here. --><vm-youtubeshowFullscreenControl="false" poster="{{ asset('img/poster.png?v=5') }}" video-id="{{ Setting::get('videoPlayer.url', '') }}"></vm-youtube><vm-ui><!-- UI components are placed here. --><vm-poster></vm-poster><vm-dbl-click-fullscreen></vm-dbl-click-fullscreen><vm-scrimgradient="up"></vm-scrim><vm-click-to-play></vm-click-to-play><vm-loading-screen><!-- Pass in content here such as a logo (optional). --></vm-loading-screen><vm-controlsfull-width><vm-control-group><vm-scrubber-control></vm-scrubber-control></vm-control-group><vm-control-groupspace="top"><vm-playback-control></vm-playback-control><vm-volume-control></vm-volume-control><vm-control-spacer></vm-control-spacer><vm-fullscreen-control></vm-fullscreen-control></vm-control-group></vm-controls><vm-click-to-play></vm-click-to-play></vm-ui></vm-player></div></div><divclass="row"> </div></div></div><!-- Videos bajo demanda --><divclass="row"><divclass="col-12"><h2>Videos bajo demanda</h2></div><divclass="col-12"><divclass="row"><!-- Video 1 --><divclass="col-md-4"><ahref="#" class="video-thumbnail" data-video-id="1Q2YXsF5vDk"><imgclass="w-100" src="{{ asset('img/poster.png?v=5') }}" alt="Thumbnail del Video 1"></a></div><!-- Video 2 --><divclass="col-md-4"><ahref="#" class="video-thumbnail" data-video-id="b6G3tN9ESbE"><imgclass="w-100" src="{{ asset('img/poster.png?v=5') }}" alt="Thumbnail del Video 2"></a></div><!-- Video 3 --><divclass="col-md-4"><!-- Contenido del video 3 --></div><!-- Agrega más columnas de video según sea necesario --></div></div></div></div></div><!-- Modal con reproductor --><divclass="modal fade" id="videoModal" tabindex="-1" aria-hidden="true"><divclass="modal-dialog modal-dialog-centered modal-lg"><divclass="modal-content"><divclass="modal-body"><divclass="embed-responsive embed-responsive-16by9"><divid="modalPlayer" class="embed-responsive-item"><vm-playerid="modal-player" :key="videoKey"><vm-youtubeid="modal-video" showFullscreenControl="false" poster="{{ asset('img/poster.png?v=5') }}"></vm-youtube><!-- Resto del código del reproductor --><vm-ui><!-- UI components are placed here. --><vm-poster></vm-poster><vm-dbl-click-fullscreen></vm-dbl-click-fullscreen><vm-scrimgradient="up"></vm-scrim><vm-click-to-play></vm-click-to-play><vm-loading-screen><!-- Pass in content here such as a logo (optional). --></vm-loading-screen><vm-controlsfull-width><vm-control-group><vm-scrubber-control></vm-scrubber-control></vm-control-group><vm-control-groupspace="top"><vm-playback-control></vm-playback-control><vm-volume-control></vm-volume-control><vm-control-spacer></vm-control-spacer><vm-fullscreen-control></vm-fullscreen-control></vm-control-group></vm-controls><vm-click-to-play></vm-click-to-play></vm-ui></vm-player></div></div></div></div></div></div>
and this is an example of the JS that I am using
$('.video-thumbnail').on('click',function(e){e.preventDefault();varvideoId=$(this).data('video-id');$('#modal-video').attr('video-id',videoId);$('#videoModal').modal('show');});$('#videoModal').on('hidden.bs.modal',function(e){// Destruye el reproductorvarplayer=document.getElementById('modal-player');player.dispose();});
The text was updated successfully, but these errors were encountered:
Hi,
I'm working on a laravel project integrating a VOD part, I'm trying to dynamically load content, using the Youtube video ID to create a new player, destroy the old one and dynamically load it in modals so that every time If you click on a thumbnail, load this content dynamically, but so far I have not been successful in doing this process. I saw someone try to do the same in angular, but in the documentation so far I only find references to dispose in version 1.0.
Example.
and this is an example of the JS that I am using
The text was updated successfully, but these errors were encountered: