rx-player
Version:
Canal+ HTML5 Video Player
36 lines • 1.62 kB
TypeScript
/**
* Copyright 2015 CANAL+ Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ITTMLHTMLCue } from "./parse_cue";
/**
* Create array of objects which should represent the given TTML text track.
* These objects have the following structure
* - start {Number}: start time, in seconds, at which the cue should
* be displayed
* - end {Number}: end time, in seconds, at which the cue should
* be displayed
* - element {HTMLElement}: <div> element representing the cue, with the
* right style. This div should then be appended to an element having
* the exact size of the wanted region the text track provide cues for.
*
* TODO TTML parsing is still pretty heavy on the CPU.
* Optimizations have been done, principally to avoid using too much XML APIs,
* but we can still do better.
* @param {string|BufferSource} input
* @param {Object} _context
* @param {number} timeOffset
*/
export default function parseTTMLToDiv(input: string | BufferSource, _context: unknown, timeOffset: number): ITTMLHTMLCue[];
//# sourceMappingURL=parse_ttml_to_div.d.ts.map