I think this may turn out to be a mime-type question, or something else equally ot, but real are maddeningly coy about the whole subject, so here goes. sorry if obvious or off-limits.
I have clip data, subtitles, languages, people, preferences and all sorts of gubbins held in a database and dished out by a perl app. Amongst its many outputs are fear, surprise, SMIL files and realtext (but the clips themselves are just referred to, wherever they might be).
It's pretty much complete, and working well, but there are two issues that i can't seem to get around:
- building the whole player window takes three cgi (well, mod_perl) calls: one for the html with embedded realplayer, one for the smil file and one for the realtext file containing the subtitles for the video. I'd much rather return one compound file, but despite its roots in xml, smil seems not to allow this.
- i can get the smil files to play back happily in the loathsome realplayer, but they refuse point blank to play in the embedded version: the plugin complains that there is no way to handle files of type '.pl'. As far as i know i'm returning the proper mime-types: application/smil, and text/vnd.rn-realtext, and the files are obviously well-formed or they wouldn't play at all.
Can anyone cast light on either of these silly problems?
The only solution i can think of is to write temporary files out to disk for each clip and subtitle set. This strikes me as kind of stupid, but it does address both problems and bring me vaguely back on topic: it's a Class::DBI / tt2 application, and could easily leave text files in public directories as a side-effect of filling out the html part of the page (in a Subtitles->url method, i suppose), replacing them only if they're out of date.
So: two questions. 1. Would that be Bad? and, 2. I can't be the only person trying to do this. Has anyone got a better way?
(Which reminds me: no, Smil.pm isn't the answer. It's roughly comparable to the output routines of CGI.pm, and i'm using the toolkit for that sort of thing.)
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.