Alan SP
Joined 8/3/2021
Alan SP said over 2 years ago on Streaming Videos with Active Storage :
After adding video_controller.js and updating the content_tags the video is no longer showing, and I'm getting this warning in the console.:

guide.js:19 Please replace data-target="video.player" with data-video-target="player". The data-target attribute is deprecated and will be removed in a future version of Stimulus. video 

 I'm not sure if the warning is why it's not showing, but I also can't figure out how to format the content_tag to change that attribute. Any advice? Cheers.

Alan SP said over 2 years ago on Streaming Videos with Active Storage :
Thanks, the second one worked with a minor typo fix (missing curly brace):

<%= content_tag :video, { 'data-video-target': 'player' } do %>

Unfortunately, I'm getting no video or console errors still.

For what it's worth, I did get it to work with the plain js block from the videojs site:

<video  id="my-video"  class="video-js vjs-big-play-centered item-video"  controls  preload="auto"  data-setup="{}">  
  <source src="<%= url_for(@item.attachment) %>" type="<%= @item.attachment.content_type %>" />  
  <p class="vjs-no-js">    
    To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>  
  </p>
</video>

Let me know if there's anything else worth trying. Cheers.