},
};
- $html5tv->{video_tags} =
+ $html5tv->{html}->{video_tags} =
join("\n",
map {
my $s = $_;
warn "last customEvent $index\n";
- $html5tv->{subtitles_table}
+ $html5tv->{html}->{subtitles_table}
= qq|<table id="subtitles">|
. join("\n",
map { qq|
. qq|</table><a href="$media_dir/video.srt">download subtitles</a>|
;
- my $hcalendar = '<div style="color: red">Create <tt>hcalendar.html</tt> to fill this space</div>';
- my $hcal_path = '$media_dir/hcalendar.html';
+ my $hCalendar = '<div style="color: red">Create <tt>hCalendar.html</tt> to fill this space</div>';
+ my $hcal_path = '$media_dir/hCalendar.html';
if ( -e $hcal_path ) {
- $html5tv->{hcalendar} = read_file $hcal_path;
+ $html5tv->{hCalendar} = read_file $hcal_path;
my $tree = HTML::TreeBuilder->new;
$tree->parse_file($hcal_path);
if ( my $vevent = $tree->look_down( class => 'vevent' ) ) {
$subtitles[ $#subtitles ]->[1] = $pos;
}
}
+ } elsif ( $line =~ m{(shot\d+.png)} ) {
+ my $shot = $1;
+ my $t = time_pos;
+ warn "shot $t $shot\n";
+ my $dir = "$media_dir/s/shot";
+ if ( ! -e $dir ) {
+ mkdir $dir;
+ warn "created $dir\n";
+ }
+ rename $1, "$dir/$t.png";
+
+ my $hires = "media_dir/s/hires";
+ mkdir $hires unless -e $hires;
+ my $max_slide = scalar( glob("$hires/*") ) || 0;
+ symlink "$dir/$t.png", "$hires/s$max_slide.png";
+ push @subtitles, [ $t, $t, "[$max_slide] video time $t slide $max_slide" ];
+ warn "created slide $max_slide at $t from $shot\n";
}
$line = '';