elvira mamedova said about 4 years ago on Streaming Videos with Active Storage :
I hoped that having something like this in application.js 

import videojs from 'video.js'
import 'video.js/dist/video-js.css'

$(document).on('turbolinks:load', function(){
  static targets = ['player']
  connect() {}
  initialize() {
    let videoPlayer = videojs(document.getElementById, {
      controls: true,
      playbackRates: [0.5, 1, 2],
      autoplay: false,
      fluid: true
    })
    videoPlayer.addClass('video-js')
    videoPlayer.addClass('vjs-big-play-centered')
  }
  disconnect() {}
});
and this in the view.html.haml 
    = content_tag :div, data: { controller: 'video' } do
      = content_tag :video, data: { target: 'video.player' } do
        = tag :source, src: url_for(@episode.video),  type: @episode.video.content_type
would work, however I can't make it work on the javascript side :(

This one works however it does not seem to be the best solution:
    %video#my-video.video-js{:controls => "", "data-setup" => "{}", :height => "264", :poster => "MY_VIDEO_POSTER.jpg", :preload => "auto", fluid: "true"}
      = tag :source, src: url_for(@lesson.video), type: @lesson.video.content_type
      %p.vjs-no-js To view this video please enable JavaScript