{
ImageView.style.display = "none";
Video.style.display = "none";
+ Video.textTracks[0].mode = "hidden";
if (current["curr"]["type"] == "image")
{
Video.style.display = "block";
Video.src = current["curr"]["path"] + "#t=" + elapsed;
SubtitleTrack.src = current["curr"]["path"] + ".vtt";
+ Video.textTracks[0].mode = "showing";
if (current["playing"])
{
Video.play()
require 'fileutils'
IMG_TYPES = %w[jpg jpeg png gif]
-VID_TYPES = %w[mp4 ogg webm]
+VID_TYPES = %w[mp4 m4v ogg webm]
TYPES = "{#{(IMG_TYPES + VID_TYPES).join(",")}}"
FILES = []
def pick_random()
if not @ratios.nil? then
- options = @ratios.map {|e| Array.new(e[1], e[0]) }.flatten.map{|k| filedata[:tree][k] }.compact
+ ratioed_options = @ratios.map {|e| Array.new(e[1], e[0]) }.flatten
+ options = ratioed_options.map{|k| filedata[:tree][k] }.compact
else
options = filedata[:tree].values
end