1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/webvtt/nsIWebVTTListener.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +/** 1.11 + * Listener for a JS WebVTT parser (vtt.js). 1.12 + */ 1.13 +[scriptable, uuid(8a2d7780-2045-4a29-99f4-df15cae5fc49)] 1.14 +interface nsIWebVTTListener : nsISupports 1.15 +{ 1.16 + /** 1.17 + * Is called when the WebVTTParser successfully parses a WebVTT cue. 1.18 + * 1.19 + * @param cue An object representing the data of a parsed WebVTT cue. 1.20 + */ 1.21 + [implicit_jscontext] 1.22 + void onCue(in jsval cue); 1.23 + 1.24 + /** 1.25 + * Is called when the WebVTT parser successfully parses a WebVTT region. 1.26 + * 1.27 + * @param region An object representing the data of a parsed 1.28 + * WebVTT region. 1.29 + */ 1.30 + [implicit_jscontext] 1.31 + void onRegion(in jsval region); 1.32 + 1.33 + /** 1.34 + * Is called when the WebVTT parser encounters a parsing error. 1.35 + * 1.36 + * @param error The error code of the ParserError the occured. 1.37 + */ 1.38 + [implicit_jscontext] 1.39 + void onParsingError(in long errorCode); 1.40 +};