<<% if params[:listen]%>audio<% else %>video<% end %> style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>" id="player" class="video-js" onmouseenter='this["data-title"]=this["title"];this["title"]=""' onmouseleave='this["title"]=this["data-title"];this["data-title"]=""' oncontextmenu='this["title"]=this["data-title"]' <% if params[:autoplay] %>autoplay<% end %> <% if params[:video_loop] %>loop<% end %> <% if params[:controls] %>controls<% end %>> <% if hlsvp %> <% else %> <% if params[:listen] %> <% audio_streams.each_with_index do |fmt, i| %> " type='<%= fmt["type"] %>' label="<%= fmt["bitrate"] %>k" selected="<%= i == 0 ? true : false %>"> <% end %> <% else %> <% if params[:quality] == "dash" %> <% end %> <% fmt_stream.each_with_index do |fmt, i| %> <% if params[:quality] %> " type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= params[:quality] == fmt["label"].split(" - ")[0] %>"> <% else %> " type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>"> <% end %> <% end %> <% end %> <% preferred_captions.each_with_index do |caption, i| %> default<% end %>> <% end %> <% captions.each do |caption| %> <% end %> <% end %> audio<% else %>video<% end %>>