manakai

Whatpm::WebVTT::Checker

A WebVTT conformance checker

SYNOPSIS

  use Whatpm::WebVTT::Checker;
  
  $checker = Whatpm::WebVTT::Checker->new;
  $checker->onerror ($error_handler);
  $checker->check_track ($track);

DESCRIPTION

The Whatpm::WebVTT::Checker module, in conjunction with Whatpm::WebVTT::Parser, forms a conformance checker for WebVTT.

METHODS

Following methods can be used to check the conformance of WebVTT documents:

$parser = Whatpm::WebVTT::Checker->new

Return a new instance of the WebVTT checker.

$parser->onerror ($new_code)
$code = $checker->onerror

Get or set the error handler. See Whatpm::Errors for more information.

$checker->check_track ($track)

Check a TextTrack (Message::DOM::TextTrack) object representing a WebVTT file. Any conformance error is reported via the error handler specified to the onerror attribute.

In addition, following methodis provided as lower-level APIs of the parser: check_text_document_fragment.

SEE ALSO

WebVTT Standard <http://dev.w3.org/html5/webvtt/>.

HTML Standard, Text Track API <http://www.whatwg.org/specs/web-apps/current-work/#text-track-api>.

Message::DOM::TextTrack.

Whatpm::WebVTT::Parser.

AUTHOR

Wakaba <w@suika.fam.cx>.

LICENSE

Copyright 2012 Wakaba <w@suika.fam.cx>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.