[ogg-dev] [PATCH] browser_plugin - kate support, build fixes, and misc

ogg.k.ogg.k at googlemail.com ogg.k.ogg.k at googlemail.com
Fri May 2 02:26:50 PDT 2008


> where is the latest javascript api documented? it does not look like
> http://wiki.xiph.org/index.php/OggPlayJavascriptAPI has been updated
> recently.

Well, I was aware of that page, but I wasn't going to change it by myself
before the patch would be accepted :)
If it is, I'll update the page.

Here's an overview for now:

+  long getNumKateTracks();

returns the number of Kate tracks found in the current stream.

+  long getCurrentKateTrack();

returns the index of the currently selected Kate track (-1 if none is)

+  string getKateTrackLanguage(in long track);

returns the language (eg, "en", or "en_GB") of the trackth Kate track
in the current stream
(may be empty if none specified in the stream)

+  string getKateTrackCategory(in long track);

returns the category (eg, "subtitles") of the trackth Kate track in
the current stream
(may be empty if none specified in the stream)

+  void selectKateTrack(in long track);

selects the trackth Kate track in the stream, -1 to select no track at all.

+  void registerKateCallback(in nsILibOggCallbackString callback);

sets a routine to be called with any Kate text from the currently selected track
(if any) as its presentation time is reached.

+  void setKateFont(in string font);

sets the font to use for displaying text (a string, eg "arial"). This
should be the
name of a font without path and without ".ttf" appended. If such a font isn't
found, a default font will be used.

+  string getKateFont();

returns the font being used - actually, this is what it should do, I
just realized
it returns the font you requested if you requested one, rather than the default
if the requested one isn't found - I'll fix that.

+  void setKateFontSize(in float relsize);

sets a font size multiplier to be used. The default is to use a font
size based on
the size of the video, but all fonts do not appear as large with the
same "point"
size, so this can be used to increase/decrease font size - also useful
for people
who prefer larger fonts.

+  float getKateFontSize();

returns the current font size multiplier.

+  void setKateRendering(in long method);

sets how to render the currently selected Kate stream (if any):
0: do not render anything (if a callback is registered, text will
still be sent to it,
  useful if one wants to not display anything but send the text to
text-to-speech)
1: render as text
2: render as overlay (YUV data from liboggplay, not implemented yet)

+  long getKateRendering();

returns the current render method being used.


I thought of adding a setKateColor/getKateColor pair as well, as different
colors would be better for different video backgrounds. Not sure about this.

> I had trouble getting oggplay to run at all on my machine ubuntu (7.10)
> But I would be interested in revisiting the issue...

Anything to do with my changes ? Error messages ?

Cheers


More information about the ogg-dev mailing list