michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * Listener for a JS WebVTT parser (vtt.js). michael@0: */ michael@0: [scriptable, uuid(8a2d7780-2045-4a29-99f4-df15cae5fc49)] michael@0: interface nsIWebVTTListener : nsISupports michael@0: { michael@0: /** michael@0: * Is called when the WebVTTParser successfully parses a WebVTT cue. michael@0: * michael@0: * @param cue An object representing the data of a parsed WebVTT cue. michael@0: */ michael@0: [implicit_jscontext] michael@0: void onCue(in jsval cue); michael@0: michael@0: /** michael@0: * Is called when the WebVTT parser successfully parses a WebVTT region. michael@0: * michael@0: * @param region An object representing the data of a parsed michael@0: * WebVTT region. michael@0: */ michael@0: [implicit_jscontext] michael@0: void onRegion(in jsval region); michael@0: michael@0: /** michael@0: * Is called when the WebVTT parser encounters a parsing error. michael@0: * michael@0: * @param error The error code of the ParserError the occured. michael@0: */ michael@0: [implicit_jscontext] michael@0: void onParsingError(in long errorCode); michael@0: };