是否可以使用 MediaRecorder 将 WebVTT 轨道(或任何其他类型的字幕轨道)与音频和视频轨道一起混合到输出流中?
WebM supports a WebVTT track .有一个 W3C doc from 2012简要提到了字幕轨道的可能性。
现在是否支持带内字幕?如果可以,我该如何使用它?
最佳答案
由于 TextTrack
已添加到 videoElement
,因此最好的选择是 videoElement.captureStream()
方法,但它目前不包含 TextTracks。
关于 Media Capture from DOM Elements 的规范只是说,
Both MediaStream and HTMLMediaElement expose the concept of a "track". Since there is no common type used for HTMLMediaElement, this document uses the term track to refer to either VideoTrack or AudioTrack.
所以我们可以说它没有谈到 TextTracks...
MediaStream.addTrack
只能处理 MediaStreamTracks,所以也不行。
不幸的是,这导致了不。 (至少目前 - 规范可能会在未来添加它,我想你可以 open an issue here 关于它)。
关于javascript - MediaRecorder、字幕和副标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39496599/