render subtitles as table so google can pick it up
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 11 Oct 2009 23:04:47 +0000 (01:04 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 11 Oct 2009 23:44:26 +0000 (01:44 +0200)
bin/mplayer.pl
www/tv.html

index fa29e08..d5e6a40 100755 (executable)
@@ -201,6 +201,16 @@ sub html5tv {
                )
        ;
 
+       $html5tv->{subtitles_table}
+               = qq|<table id="subtitles">|
+               . join("\n",
+                       map {
+                               qq|<tr><td>$_->[0]</td><td>$_->[1]</td><td>$_->[2]</td></tr>|
+                       } @subtitles
+               )
+               . qq|</table>|
+               ;
+
        warn "html5tv ", dump $html5tv;
 
        my $sync_path = 'www/media/video.js';
index 4c6d381..949677c 100644 (file)
@@ -57,6 +57,8 @@
        </ul>\r
 </div> <!-- carouselContainer -->\r
 \r
+{subtitles_table}\r
+\r
 <p>This web interface is based on BBC R&amp;D TV\r
 <a href="http://www.bbc.co.uk/blogs/rad/2009/08/html5.html">HTML 5 and timed media</a> from the RAD blog</p>\r
 \r