@tscaps/engine 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (657) hide show
  1. package/README.md +48 -10
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/modules/bidi/BidiAnalyzer.d.ts +23 -0
  7. package/dist/modules/bidi/BidiAnalyzer.d.ts.map +1 -0
  8. package/dist/modules/bidi/BidiAnalyzer.js +2 -0
  9. package/dist/modules/bidi/BidiAnalyzer.js.map +1 -0
  10. package/dist/modules/bidi/BidiCharacterClassifier.d.ts +13 -0
  11. package/dist/modules/bidi/BidiCharacterClassifier.d.ts.map +1 -0
  12. package/dist/modules/bidi/BidiCharacterClassifier.js +2 -0
  13. package/dist/modules/bidi/BidiCharacterClassifier.js.map +1 -0
  14. package/dist/modules/bidi/BidiJsAnalyzer.d.ts +14 -0
  15. package/dist/modules/bidi/BidiJsAnalyzer.d.ts.map +1 -0
  16. package/dist/modules/bidi/BidiJsAnalyzer.js +19 -0
  17. package/dist/modules/bidi/BidiJsAnalyzer.js.map +1 -0
  18. package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts +8 -0
  19. package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts.map +1 -0
  20. package/dist/modules/bidi/BidiJsCharacterClassifier.js +19 -0
  21. package/dist/modules/bidi/BidiJsCharacterClassifier.js.map +1 -0
  22. package/dist/modules/bidi/CursiveScriptDetector.d.ts +12 -0
  23. package/dist/modules/bidi/CursiveScriptDetector.d.ts.map +1 -0
  24. package/dist/modules/bidi/CursiveScriptDetector.js +20 -0
  25. package/dist/modules/bidi/CursiveScriptDetector.js.map +1 -0
  26. package/dist/modules/bidi/HorizontalSide.d.ts +18 -0
  27. package/dist/modules/bidi/HorizontalSide.d.ts.map +1 -0
  28. package/dist/modules/bidi/HorizontalSide.js +3 -0
  29. package/dist/modules/bidi/HorizontalSide.js.map +1 -0
  30. package/dist/modules/bidi/HorizontalSideResolver.d.ts +21 -0
  31. package/dist/modules/bidi/HorizontalSideResolver.d.ts.map +1 -0
  32. package/dist/modules/bidi/HorizontalSideResolver.js +27 -0
  33. package/dist/modules/bidi/HorizontalSideResolver.js.map +1 -0
  34. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts +24 -0
  35. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts.map +1 -0
  36. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js +34 -0
  37. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js.map +1 -0
  38. package/dist/modules/bidi/TextDirection.d.ts +9 -0
  39. package/dist/modules/bidi/TextDirection.d.ts.map +1 -0
  40. package/dist/modules/bidi/TextDirection.js +2 -0
  41. package/dist/modules/bidi/TextDirection.js.map +1 -0
  42. package/dist/modules/bidi/TextDirectionDetector.d.ts +12 -0
  43. package/dist/modules/bidi/TextDirectionDetector.d.ts.map +1 -0
  44. package/dist/modules/bidi/TextDirectionDetector.js +2 -0
  45. package/dist/modules/bidi/TextDirectionDetector.js.map +1 -0
  46. package/dist/modules/bidi/WordFragment.d.ts +34 -0
  47. package/dist/modules/bidi/WordFragment.d.ts.map +1 -0
  48. package/dist/modules/bidi/WordFragment.js +2 -0
  49. package/dist/modules/bidi/WordFragment.js.map +1 -0
  50. package/dist/modules/bidi/WordFragmenter.d.ts +43 -0
  51. package/dist/modules/bidi/WordFragmenter.d.ts.map +1 -0
  52. package/dist/modules/bidi/WordFragmenter.js +112 -0
  53. package/dist/modules/bidi/WordFragmenter.js.map +1 -0
  54. package/dist/modules/bidi/index.d.ts +14 -0
  55. package/dist/modules/bidi/index.d.ts.map +1 -0
  56. package/dist/modules/bidi/index.js +8 -0
  57. package/dist/modules/bidi/index.js.map +1 -0
  58. package/dist/modules/css/CssBlockSealer.d.ts +30 -0
  59. package/dist/modules/css/CssBlockSealer.d.ts.map +1 -0
  60. package/dist/modules/css/CssBlockSealer.js +64 -0
  61. package/dist/modules/css/CssBlockSealer.js.map +1 -0
  62. package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts +13 -0
  63. package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts.map +1 -0
  64. package/dist/modules/css/CssCustomPropertyDefinitionScanner.js +24 -0
  65. package/dist/modules/css/CssCustomPropertyDefinitionScanner.js.map +1 -0
  66. package/dist/modules/css/CssFilterReferenceScanner.d.ts +15 -0
  67. package/dist/modules/css/CssFilterReferenceScanner.d.ts.map +1 -0
  68. package/dist/modules/css/CssFilterReferenceScanner.js +22 -0
  69. package/dist/modules/css/CssFilterReferenceScanner.js.map +1 -0
  70. package/dist/modules/css/CssFragmentParser.d.ts +53 -0
  71. package/dist/modules/css/CssFragmentParser.d.ts.map +1 -0
  72. package/dist/modules/css/CssFragmentParser.js +127 -0
  73. package/dist/modules/css/CssFragmentParser.js.map +1 -0
  74. package/dist/modules/css/CssKeyframeNamespacer.d.ts +21 -0
  75. package/dist/modules/css/CssKeyframeNamespacer.d.ts.map +1 -0
  76. package/dist/modules/css/CssKeyframeNamespacer.js +48 -0
  77. package/dist/modules/css/CssKeyframeNamespacer.js.map +1 -0
  78. package/dist/modules/css/CssKeyframesScanner.d.ts +29 -0
  79. package/dist/modules/css/CssKeyframesScanner.d.ts.map +1 -0
  80. package/dist/modules/css/CssKeyframesScanner.js +102 -0
  81. package/dist/modules/css/CssKeyframesScanner.js.map +1 -0
  82. package/dist/modules/css/CssLayer.d.ts +20 -0
  83. package/dist/modules/css/CssLayer.d.ts.map +1 -0
  84. package/dist/modules/css/CssLayer.js +21 -0
  85. package/dist/modules/css/CssLayer.js.map +1 -0
  86. package/dist/modules/css/CssScoper.d.ts +31 -2
  87. package/dist/modules/css/CssScoper.d.ts.map +1 -1
  88. package/dist/modules/css/CssScoper.js +168 -79
  89. package/dist/modules/css/CssScoper.js.map +1 -1
  90. package/dist/modules/css/CssSelectorClassScanner.d.ts +25 -0
  91. package/dist/modules/css/CssSelectorClassScanner.d.ts.map +1 -0
  92. package/dist/modules/css/CssSelectorClassScanner.js +91 -0
  93. package/dist/modules/css/CssSelectorClassScanner.js.map +1 -0
  94. package/dist/modules/css/CssVarReferenceScanner.d.ts +16 -0
  95. package/dist/modules/css/CssVarReferenceScanner.d.ts.map +1 -0
  96. package/dist/modules/css/CssVarReferenceScanner.js +27 -0
  97. package/dist/modules/css/CssVarReferenceScanner.js.map +1 -0
  98. package/dist/modules/css/index.d.ts +9 -0
  99. package/dist/modules/css/index.d.ts.map +1 -1
  100. package/dist/modules/css/index.js +9 -0
  101. package/dist/modules/css/index.js.map +1 -1
  102. package/dist/modules/document/CssClass.d.ts +20 -0
  103. package/dist/modules/document/CssClass.d.ts.map +1 -0
  104. package/dist/modules/document/CssClass.js +21 -0
  105. package/dist/modules/document/CssClass.js.map +1 -0
  106. package/dist/modules/document/CssVariable.d.ts +21 -6
  107. package/dist/modules/document/CssVariable.d.ts.map +1 -1
  108. package/dist/modules/document/CssVariable.js +27 -5
  109. package/dist/modules/document/CssVariable.js.map +1 -1
  110. package/dist/modules/document/DataAttribute.d.ts +26 -0
  111. package/dist/modules/document/DataAttribute.d.ts.map +1 -0
  112. package/dist/modules/document/DataAttribute.js +27 -0
  113. package/dist/modules/document/DataAttribute.js.map +1 -0
  114. package/dist/modules/document/Decoration.d.ts +42 -0
  115. package/dist/modules/document/Decoration.d.ts.map +1 -0
  116. package/dist/modules/document/Decoration.js +52 -0
  117. package/dist/modules/document/Decoration.js.map +1 -0
  118. package/dist/modules/document/Document.d.ts.map +1 -1
  119. package/dist/modules/document/Document.js +0 -3
  120. package/dist/modules/document/Document.js.map +1 -1
  121. package/dist/modules/document/DocumentEditor.d.ts +51 -9
  122. package/dist/modules/document/DocumentEditor.d.ts.map +1 -1
  123. package/dist/modules/document/DocumentEditor.js +118 -26
  124. package/dist/modules/document/DocumentEditor.js.map +1 -1
  125. package/dist/modules/document/DocumentNodeId.d.ts +23 -0
  126. package/dist/modules/document/DocumentNodeId.d.ts.map +1 -0
  127. package/dist/modules/document/DocumentNodeId.js +31 -0
  128. package/dist/modules/document/DocumentNodeId.js.map +1 -0
  129. package/dist/modules/document/Line.d.ts +10 -7
  130. package/dist/modules/document/Line.d.ts.map +1 -1
  131. package/dist/modules/document/Line.js +13 -25
  132. package/dist/modules/document/Line.js.map +1 -1
  133. package/dist/modules/document/Section.d.ts +1 -8
  134. package/dist/modules/document/Section.d.ts.map +1 -1
  135. package/dist/modules/document/Section.js +4 -35
  136. package/dist/modules/document/Section.js.map +1 -1
  137. package/dist/modules/document/Segment.d.ts +24 -14
  138. package/dist/modules/document/Segment.d.ts.map +1 -1
  139. package/dist/modules/document/Segment.js +41 -23
  140. package/dist/modules/document/Segment.js.map +1 -1
  141. package/dist/modules/document/Word.d.ts +21 -8
  142. package/dist/modules/document/Word.d.ts.map +1 -1
  143. package/dist/modules/document/Word.js +34 -35
  144. package/dist/modules/document/Word.js.map +1 -1
  145. package/dist/modules/document/index.d.ts +5 -2
  146. package/dist/modules/document/index.d.ts.map +1 -1
  147. package/dist/modules/document/index.js +4 -1
  148. package/dist/modules/document/index.js.map +1 -1
  149. package/dist/modules/effect/CarryQuotesEffect.d.ts +1 -7
  150. package/dist/modules/effect/CarryQuotesEffect.d.ts.map +1 -1
  151. package/dist/modules/effect/CarryQuotesEffect.js +17 -30
  152. package/dist/modules/effect/CarryQuotesEffect.js.map +1 -1
  153. package/dist/modules/effect/GapFreeEffect.d.ts +15 -0
  154. package/dist/modules/effect/GapFreeEffect.d.ts.map +1 -1
  155. package/dist/modules/effect/GapFreeEffect.js +29 -4
  156. package/dist/modules/effect/GapFreeEffect.js.map +1 -1
  157. package/dist/modules/effect/RemovePunctuationEffect.d.ts +10 -2
  158. package/dist/modules/effect/RemovePunctuationEffect.d.ts.map +1 -1
  159. package/dist/modules/effect/RemovePunctuationEffect.js +26 -6
  160. package/dist/modules/effect/RemovePunctuationEffect.js.map +1 -1
  161. package/dist/modules/effect/SmartLowercaseEffect.d.ts +7 -6
  162. package/dist/modules/effect/SmartLowercaseEffect.d.ts.map +1 -1
  163. package/dist/modules/effect/SmartLowercaseEffect.js +11 -7
  164. package/dist/modules/effect/SmartLowercaseEffect.js.map +1 -1
  165. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts +3 -3
  166. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts.map +1 -1
  167. package/dist/modules/pipeline/RenderPipelineBuilder.js +13 -8
  168. package/dist/modules/pipeline/RenderPipelineBuilder.js.map +1 -1
  169. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts +19 -25
  170. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts.map +1 -1
  171. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js +43 -717
  172. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js.map +1 -1
  173. package/dist/modules/rendering/HorizontalPlacementResolver.d.ts +27 -0
  174. package/dist/modules/rendering/HorizontalPlacementResolver.d.ts.map +1 -0
  175. package/dist/modules/rendering/HorizontalPlacementResolver.js +31 -0
  176. package/dist/modules/rendering/HorizontalPlacementResolver.js.map +1 -0
  177. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts +10 -5
  178. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts.map +1 -1
  179. package/dist/modules/rendering/index.d.ts +16 -8
  180. package/dist/modules/rendering/index.d.ts.map +1 -1
  181. package/dist/modules/rendering/index.js +8 -2
  182. package/dist/modules/rendering/index.js.map +1 -1
  183. package/dist/modules/rendering/styles/BaselineCssComposer.d.ts +41 -0
  184. package/dist/modules/rendering/styles/BaselineCssComposer.d.ts.map +1 -0
  185. package/dist/modules/rendering/styles/BaselineCssComposer.js +64 -0
  186. package/dist/modules/rendering/styles/BaselineCssComposer.js.map +1 -0
  187. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts +7 -0
  188. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts.map +1 -0
  189. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js +35 -0
  190. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js.map +1 -0
  191. package/dist/modules/rendering/styles/FrozenFrameCss.d.ts +28 -0
  192. package/dist/modules/rendering/styles/FrozenFrameCss.d.ts.map +1 -0
  193. package/dist/modules/rendering/styles/FrozenFrameCss.js +28 -0
  194. package/dist/modules/rendering/styles/FrozenFrameCss.js.map +1 -0
  195. package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts +20 -0
  196. package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts.map +1 -0
  197. package/dist/modules/rendering/styles/InlineStyleEmitter.js +44 -0
  198. package/dist/modules/rendering/styles/InlineStyleEmitter.js.map +1 -0
  199. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts +15 -0
  200. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts.map +1 -0
  201. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js +33 -0
  202. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js.map +1 -0
  203. package/dist/modules/rendering/{VideoFrameLayerClass.d.ts → styles/VideoFrameLayerBaselineCss.d.ts} +3 -10
  204. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.d.ts.map +1 -0
  205. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js +15 -0
  206. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js.map +1 -0
  207. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts +13 -0
  208. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts.map +1 -0
  209. package/dist/modules/rendering/subtitle/AbstractAnim.js +2 -0
  210. package/dist/modules/rendering/subtitle/AbstractAnim.js.map +1 -0
  211. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts +20 -0
  212. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts.map +1 -0
  213. package/dist/modules/rendering/subtitle/ActiveRenderSession.js +31 -0
  214. package/dist/modules/rendering/subtitle/ActiveRenderSession.js.map +1 -0
  215. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts +21 -0
  216. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts.map +1 -0
  217. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js +46 -0
  218. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js.map +1 -0
  219. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts +39 -0
  220. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts.map +1 -0
  221. package/dist/modules/rendering/subtitle/AnimationProbe.js +203 -0
  222. package/dist/modules/rendering/subtitle/AnimationProbe.js.map +1 -0
  223. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts +15 -0
  224. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts.map +1 -0
  225. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js +26 -0
  226. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js.map +1 -0
  227. package/dist/modules/rendering/subtitle/BatchPlan.d.ts +32 -0
  228. package/dist/modules/rendering/subtitle/BatchPlan.d.ts.map +1 -0
  229. package/dist/modules/rendering/subtitle/BatchPlan.js +2 -0
  230. package/dist/modules/rendering/subtitle/BatchPlan.js.map +1 -0
  231. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts +32 -0
  232. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts.map +1 -0
  233. package/dist/modules/rendering/subtitle/BatchPlanner.js +93 -0
  234. package/dist/modules/rendering/subtitle/BatchPlanner.js.map +1 -0
  235. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts +36 -0
  236. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts.map +1 -0
  237. package/dist/modules/rendering/subtitle/PreparedStyle.js +2 -0
  238. package/dist/modules/rendering/subtitle/PreparedStyle.js.map +1 -0
  239. package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts +31 -0
  240. package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts.map +1 -0
  241. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js +91 -0
  242. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js.map +1 -0
  243. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts +13 -0
  244. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts.map +1 -0
  245. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js +24 -0
  246. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js.map +1 -0
  247. package/dist/modules/rendering/{SegmentPaintRegionResolver.d.ts → subtitle/SegmentPaintRegionResolver.d.ts} +1 -1
  248. package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.d.ts.map +1 -0
  249. package/dist/modules/rendering/{SegmentPaintRegionResolver.js → subtitle/SegmentPaintRegionResolver.js} +7 -4
  250. package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.js.map +1 -0
  251. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts +45 -0
  252. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts.map +1 -0
  253. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js +50 -0
  254. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js.map +1 -0
  255. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts +108 -0
  256. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts.map +1 -0
  257. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js +246 -0
  258. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js.map +1 -0
  259. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts +40 -0
  260. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts.map +1 -0
  261. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js +132 -0
  262. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js.map +1 -0
  263. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts +48 -0
  264. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts.map +1 -0
  265. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js +143 -0
  266. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js.map +1 -0
  267. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts +17 -0
  268. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts.map +1 -0
  269. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js +58 -0
  270. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js.map +1 -0
  271. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts +20 -0
  272. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts.map +1 -0
  273. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js +30 -0
  274. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js.map +1 -0
  275. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts +42 -0
  276. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts.map +1 -0
  277. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js +121 -0
  278. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js.map +1 -0
  279. package/dist/modules/rendering/types/AlignmentConfig.d.ts +33 -0
  280. package/dist/modules/rendering/types/AlignmentConfig.d.ts.map +1 -0
  281. package/dist/modules/rendering/types/AlignmentConfig.js +3 -0
  282. package/dist/modules/rendering/types/AlignmentConfig.js.map +1 -0
  283. package/dist/modules/rendering/types/BoxEdges.d.ts.map +1 -0
  284. package/dist/modules/rendering/types/BoxEdges.js.map +1 -0
  285. package/dist/modules/rendering/types/DecorationPlacementSide.d.ts +8 -0
  286. package/dist/modules/rendering/types/DecorationPlacementSide.d.ts.map +1 -0
  287. package/dist/modules/rendering/types/DecorationPlacementSide.js +2 -0
  288. package/dist/modules/rendering/types/DecorationPlacementSide.js.map +1 -0
  289. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts +23 -0
  290. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts.map +1 -0
  291. package/dist/modules/rendering/types/ElementRenderOverrides.js +52 -0
  292. package/dist/modules/rendering/types/ElementRenderOverrides.js.map +1 -0
  293. package/dist/modules/rendering/types/InlineStyleMap.d.ts.map +1 -0
  294. package/dist/modules/rendering/types/InlineStyleMap.js.map +1 -0
  295. package/dist/modules/rendering/{RenderingConfig.d.ts → types/RenderingConfig.d.ts} +8 -1
  296. package/dist/modules/rendering/types/RenderingConfig.d.ts.map +1 -0
  297. package/dist/modules/rendering/types/RenderingConfig.js.map +1 -0
  298. package/dist/modules/rendering/types/ScopedRenderOverride.d.ts +24 -0
  299. package/dist/modules/rendering/types/ScopedRenderOverride.d.ts.map +1 -0
  300. package/dist/modules/rendering/types/ScopedRenderOverride.js.map +1 -0
  301. package/dist/modules/rendering/types/VideoFrameSource.d.ts.map +1 -0
  302. package/dist/modules/rendering/types/VideoFrameSource.js.map +1 -0
  303. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts +33 -0
  304. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts.map +1 -0
  305. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js +100 -0
  306. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js.map +1 -0
  307. package/dist/modules/splitting/FixedTailLineSplitter.d.ts +29 -0
  308. package/dist/modules/splitting/FixedTailLineSplitter.d.ts.map +1 -0
  309. package/dist/modules/splitting/FixedTailLineSplitter.js +43 -0
  310. package/dist/modules/splitting/FixedTailLineSplitter.js.map +1 -0
  311. package/dist/modules/splitting/index.d.ts +4 -0
  312. package/dist/modules/splitting/index.d.ts.map +1 -1
  313. package/dist/modules/splitting/index.js +2 -0
  314. package/dist/modules/splitting/index.js.map +1 -1
  315. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts +53 -0
  316. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts.map +1 -0
  317. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js +133 -0
  318. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js.map +1 -0
  319. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts +20 -0
  320. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts.map +1 -0
  321. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js +31 -0
  322. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js.map +1 -0
  323. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts +21 -0
  324. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts.map +1 -0
  325. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js +33 -0
  326. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js.map +1 -0
  327. package/dist/modules/subtitle-file/SubtitleCue.d.ts +18 -0
  328. package/dist/modules/subtitle-file/SubtitleCue.d.ts.map +1 -0
  329. package/dist/modules/subtitle-file/SubtitleCue.js +20 -0
  330. package/dist/modules/subtitle-file/SubtitleCue.js.map +1 -0
  331. package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts +38 -0
  332. package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts.map +1 -0
  333. package/dist/modules/subtitle-file/SubtitleCueBuilder.js +106 -0
  334. package/dist/modules/subtitle-file/SubtitleCueBuilder.js.map +1 -0
  335. package/dist/modules/subtitle-file/SubtitleFileJob.d.ts +17 -0
  336. package/dist/modules/subtitle-file/SubtitleFileJob.d.ts.map +1 -0
  337. package/dist/modules/subtitle-file/SubtitleFileJob.js +2 -0
  338. package/dist/modules/subtitle-file/SubtitleFileJob.js.map +1 -0
  339. package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts +36 -0
  340. package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts.map +1 -0
  341. package/dist/modules/subtitle-file/SubtitleFileSerializer.js +44 -0
  342. package/dist/modules/subtitle-file/SubtitleFileSerializer.js.map +1 -0
  343. package/dist/modules/subtitle-file/SubtitleGranularity.d.ts +11 -0
  344. package/dist/modules/subtitle-file/SubtitleGranularity.d.ts.map +1 -0
  345. package/dist/modules/subtitle-file/SubtitleGranularity.js +2 -0
  346. package/dist/modules/subtitle-file/SubtitleGranularity.js.map +1 -0
  347. package/dist/modules/subtitle-file/SubtitleRow.d.ts +11 -0
  348. package/dist/modules/subtitle-file/SubtitleRow.d.ts.map +1 -0
  349. package/dist/modules/subtitle-file/SubtitleRow.js +14 -0
  350. package/dist/modules/subtitle-file/SubtitleRow.js.map +1 -0
  351. package/dist/modules/subtitle-file/SubtitleToken.d.ts +13 -0
  352. package/dist/modules/subtitle-file/SubtitleToken.d.ts.map +1 -0
  353. package/dist/modules/subtitle-file/SubtitleToken.js +15 -0
  354. package/dist/modules/subtitle-file/SubtitleToken.js.map +1 -0
  355. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts +19 -0
  356. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts.map +1 -0
  357. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js +24 -0
  358. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js.map +1 -0
  359. package/dist/modules/subtitle-file/Timecode.d.ts +20 -0
  360. package/dist/modules/subtitle-file/Timecode.d.ts.map +1 -0
  361. package/dist/modules/subtitle-file/Timecode.js +32 -0
  362. package/dist/modules/subtitle-file/Timecode.js.map +1 -0
  363. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts +22 -0
  364. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts.map +1 -0
  365. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js +57 -0
  366. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js.map +1 -0
  367. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts +21 -0
  368. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts.map +1 -0
  369. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js +39 -0
  370. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js.map +1 -0
  371. package/dist/modules/subtitle-file/index.d.ts +10 -0
  372. package/dist/modules/subtitle-file/index.d.ts.map +1 -0
  373. package/dist/modules/subtitle-file/index.js +8 -0
  374. package/dist/modules/subtitle-file/index.js.map +1 -0
  375. package/dist/modules/svg-filter/SvgFilter.d.ts +8 -1
  376. package/dist/modules/svg-filter/SvgFilter.d.ts.map +1 -1
  377. package/dist/modules/svg-filter/SvgFilter.js +9 -1
  378. package/dist/modules/svg-filter/SvgFilter.js.map +1 -1
  379. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts +1 -0
  380. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts.map +1 -1
  381. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js +9 -1
  382. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js.map +1 -1
  383. package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts +44 -0
  384. package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts.map +1 -0
  385. package/dist/modules/svg-filter/SvgFilterDefsRenderer.js +47 -0
  386. package/dist/modules/svg-filter/SvgFilterDefsRenderer.js.map +1 -0
  387. package/dist/modules/svg-filter/index.d.ts +2 -0
  388. package/dist/modules/svg-filter/index.d.ts.map +1 -1
  389. package/dist/modules/svg-filter/index.js +1 -0
  390. package/dist/modules/svg-filter/index.js.map +1 -1
  391. package/dist/modules/tagging/PauseTagger.d.ts +24 -0
  392. package/dist/modules/tagging/PauseTagger.d.ts.map +1 -0
  393. package/dist/modules/tagging/PauseTagger.js +42 -0
  394. package/dist/modules/tagging/PauseTagger.js.map +1 -0
  395. package/dist/modules/tagging/RegexTagger.js +1 -1
  396. package/dist/modules/tagging/RegexTagger.js.map +1 -1
  397. package/dist/modules/tagging/SpanTagger.js +1 -1
  398. package/dist/modules/tagging/SpanTagger.js.map +1 -1
  399. package/dist/modules/tagging/StructureTagger.d.ts +1 -2
  400. package/dist/modules/tagging/StructureTagger.d.ts.map +1 -1
  401. package/dist/modules/tagging/StructureTagger.js +12 -11
  402. package/dist/modules/tagging/StructureTagger.js.map +1 -1
  403. package/dist/modules/tagging/WordlistTagger.js +1 -1
  404. package/dist/modules/tagging/WordlistTagger.js.map +1 -1
  405. package/dist/modules/tagging/index.d.ts +2 -0
  406. package/dist/modules/tagging/index.d.ts.map +1 -1
  407. package/dist/modules/tagging/index.js +1 -0
  408. package/dist/modules/tagging/index.js.map +1 -1
  409. package/dist/modules/tags/AndTagCondition.d.ts +10 -0
  410. package/dist/modules/tags/AndTagCondition.d.ts.map +1 -0
  411. package/dist/modules/tags/AndTagCondition.js +14 -0
  412. package/dist/modules/tags/AndTagCondition.js.map +1 -0
  413. package/dist/modules/tags/HasTagCondition.d.ts +10 -0
  414. package/dist/modules/tags/HasTagCondition.d.ts.map +1 -0
  415. package/dist/modules/tags/HasTagCondition.js +18 -0
  416. package/dist/modules/tags/HasTagCondition.js.map +1 -0
  417. package/dist/modules/tags/NotTagCondition.d.ts +10 -0
  418. package/dist/modules/tags/NotTagCondition.d.ts.map +1 -0
  419. package/dist/modules/tags/NotTagCondition.js +14 -0
  420. package/dist/modules/tags/NotTagCondition.js.map +1 -0
  421. package/dist/modules/tags/OrTagCondition.d.ts +10 -0
  422. package/dist/modules/tags/OrTagCondition.d.ts.map +1 -0
  423. package/dist/modules/tags/OrTagCondition.js +14 -0
  424. package/dist/modules/tags/OrTagCondition.js.map +1 -0
  425. package/dist/modules/{document/Tag.d.ts → tags/StructureTag.d.ts} +4 -10
  426. package/dist/modules/tags/StructureTag.d.ts.map +1 -0
  427. package/dist/modules/{document/Tag.js → tags/StructureTag.js} +4 -19
  428. package/dist/modules/tags/StructureTag.js.map +1 -0
  429. package/dist/modules/tags/Tag.d.ts +8 -0
  430. package/dist/modules/tags/Tag.d.ts.map +1 -0
  431. package/dist/modules/tags/Tag.js +16 -0
  432. package/dist/modules/tags/Tag.js.map +1 -0
  433. package/dist/modules/tags/TagCondition.d.ts +12 -0
  434. package/dist/modules/tags/TagCondition.d.ts.map +1 -0
  435. package/dist/modules/tags/TagCondition.js +2 -0
  436. package/dist/modules/tags/TagCondition.js.map +1 -0
  437. package/dist/modules/tags/TagConditionParser.d.ts +21 -0
  438. package/dist/modules/tags/TagConditionParser.d.ts.map +1 -0
  439. package/dist/modules/tags/TagConditionParser.js +75 -0
  440. package/dist/modules/tags/TagConditionParser.js.map +1 -0
  441. package/dist/modules/tags/index.d.ts +9 -0
  442. package/dist/modules/tags/index.d.ts.map +1 -0
  443. package/dist/modules/tags/index.js +8 -0
  444. package/dist/modules/tags/index.js.map +1 -0
  445. package/dist/modules/transcription/AudioDecoder.d.ts +9 -4
  446. package/dist/modules/transcription/AudioDecoder.d.ts.map +1 -1
  447. package/dist/modules/transcription/BatchedMonoResampler.d.ts +45 -0
  448. package/dist/modules/transcription/BatchedMonoResampler.d.ts.map +1 -0
  449. package/dist/modules/transcription/BatchedMonoResampler.js +116 -0
  450. package/dist/modules/transcription/BatchedMonoResampler.js.map +1 -0
  451. package/dist/modules/transcription/CacheStorageModelFileCache.d.ts +38 -0
  452. package/dist/modules/transcription/CacheStorageModelFileCache.d.ts.map +1 -0
  453. package/dist/modules/transcription/CacheStorageModelFileCache.js +86 -0
  454. package/dist/modules/transcription/CacheStorageModelFileCache.js.map +1 -0
  455. package/dist/modules/transcription/CueDocumentBuilder.d.ts +40 -0
  456. package/dist/modules/transcription/CueDocumentBuilder.d.ts.map +1 -0
  457. package/dist/modules/transcription/CueDocumentBuilder.js +77 -0
  458. package/dist/modules/transcription/CueDocumentBuilder.js.map +1 -0
  459. package/dist/modules/transcription/CueParseResult.d.ts +16 -0
  460. package/dist/modules/transcription/CueParseResult.d.ts.map +1 -0
  461. package/dist/modules/transcription/CueParseResult.js +2 -0
  462. package/dist/modules/transcription/CueParseResult.js.map +1 -0
  463. package/dist/modules/transcription/CueTextTokenizer.d.ts +10 -0
  464. package/dist/modules/transcription/CueTextTokenizer.d.ts.map +1 -0
  465. package/dist/modules/transcription/CueTextTokenizer.js +21 -0
  466. package/dist/modules/transcription/CueTextTokenizer.js.map +1 -0
  467. package/dist/modules/transcription/CueTimecodeReader.d.ts +19 -0
  468. package/dist/modules/transcription/CueTimecodeReader.d.ts.map +1 -0
  469. package/dist/modules/transcription/CueTimecodeReader.js +45 -0
  470. package/dist/modules/transcription/CueTimecodeReader.js.map +1 -0
  471. package/dist/modules/transcription/CueWordReader.d.ts +12 -0
  472. package/dist/modules/transcription/CueWordReader.d.ts.map +1 -0
  473. package/dist/modules/transcription/CueWordReader.js +2 -0
  474. package/dist/modules/transcription/CueWordReader.js.map +1 -0
  475. package/dist/modules/transcription/EstimatedCueWordReader.d.ts +16 -0
  476. package/dist/modules/transcription/EstimatedCueWordReader.d.ts.map +1 -0
  477. package/dist/modules/transcription/EstimatedCueWordReader.js +17 -0
  478. package/dist/modules/transcription/EstimatedCueWordReader.js.map +1 -0
  479. package/dist/modules/transcription/LogitsProcessorListFactory.d.ts +43 -0
  480. package/dist/modules/transcription/LogitsProcessorListFactory.d.ts.map +1 -0
  481. package/dist/modules/transcription/LogitsProcessorListFactory.js +72 -0
  482. package/dist/modules/transcription/LogitsProcessorListFactory.js.map +1 -0
  483. package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts +27 -0
  484. package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts.map +1 -0
  485. package/dist/modules/transcription/MediaBunnyAudioDecoder.js +76 -0
  486. package/dist/modules/transcription/MediaBunnyAudioDecoder.js.map +1 -0
  487. package/dist/modules/transcription/ModelFileCache.d.ts +20 -0
  488. package/dist/modules/transcription/ModelFileCache.d.ts.map +1 -0
  489. package/dist/modules/transcription/ModelFileCache.js +2 -0
  490. package/dist/modules/transcription/ModelFileCache.js.map +1 -0
  491. package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts +18 -0
  492. package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts.map +1 -0
  493. package/dist/modules/transcription/ModelFileCacheUnavailableError.js +18 -0
  494. package/dist/modules/transcription/ModelFileCacheUnavailableError.js.map +1 -0
  495. package/dist/modules/transcription/SrtTranscriber.d.ts +24 -15
  496. package/dist/modules/transcription/SrtTranscriber.d.ts.map +1 -1
  497. package/dist/modules/transcription/SrtTranscriber.js +32 -90
  498. package/dist/modules/transcription/SrtTranscriber.js.map +1 -1
  499. package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts +22 -0
  500. package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts.map +1 -0
  501. package/dist/modules/transcription/SubtitleFileUnreadableError.js +22 -0
  502. package/dist/modules/transcription/SubtitleFileUnreadableError.js.map +1 -0
  503. package/dist/modules/transcription/TimestampedCueWordReader.d.ts +27 -0
  504. package/dist/modules/transcription/TimestampedCueWordReader.d.ts.map +1 -0
  505. package/dist/modules/transcription/TimestampedCueWordReader.js +52 -0
  506. package/dist/modules/transcription/TimestampedCueWordReader.js.map +1 -0
  507. package/dist/modules/transcription/Transcriber.d.ts +13 -0
  508. package/dist/modules/transcription/Transcriber.d.ts.map +1 -1
  509. package/dist/modules/transcription/TransformersRuntime.d.ts +50 -0
  510. package/dist/modules/transcription/TransformersRuntime.d.ts.map +1 -0
  511. package/dist/modules/transcription/TransformersRuntime.js +79 -0
  512. package/dist/modules/transcription/TransformersRuntime.js.map +1 -0
  513. package/dist/modules/transcription/VttTranscriber.d.ts +46 -0
  514. package/dist/modules/transcription/VttTranscriber.d.ts.map +1 -0
  515. package/dist/modules/transcription/VttTranscriber.js +80 -0
  516. package/dist/modules/transcription/VttTranscriber.js.map +1 -0
  517. package/dist/modules/transcription/WhisperChunkStitcher.d.ts +51 -0
  518. package/dist/modules/transcription/WhisperChunkStitcher.d.ts.map +1 -0
  519. package/dist/modules/transcription/WhisperChunkStitcher.js +101 -0
  520. package/dist/modules/transcription/WhisperChunkStitcher.js.map +1 -0
  521. package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts +16 -0
  522. package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts.map +1 -0
  523. package/dist/modules/transcription/WhisperDeviceUnavailableError.js +16 -0
  524. package/dist/modules/transcription/WhisperDeviceUnavailableError.js.map +1 -0
  525. package/dist/modules/transcription/WhisperInferenceFailedError.d.ts +16 -0
  526. package/dist/modules/transcription/WhisperInferenceFailedError.d.ts.map +1 -0
  527. package/dist/modules/transcription/WhisperInferenceFailedError.js +16 -0
  528. package/dist/modules/transcription/WhisperInferenceFailedError.js.map +1 -0
  529. package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts +61 -0
  530. package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts.map +1 -0
  531. package/dist/modules/transcription/WhisperInferenceProgressTracker.js +102 -0
  532. package/dist/modules/transcription/WhisperInferenceProgressTracker.js.map +1 -0
  533. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts +38 -0
  534. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts.map +1 -0
  535. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js +94 -0
  536. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js.map +1 -0
  537. package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts +15 -0
  538. package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts.map +1 -0
  539. package/dist/modules/transcription/WhisperModelLoadFailedError.js +15 -0
  540. package/dist/modules/transcription/WhisperModelLoadFailedError.js.map +1 -0
  541. package/dist/modules/transcription/WhisperTranscriber.d.ts +106 -7
  542. package/dist/modules/transcription/WhisperTranscriber.d.ts.map +1 -1
  543. package/dist/modules/transcription/WhisperTranscriber.js +312 -25
  544. package/dist/modules/transcription/WhisperTranscriber.js.map +1 -1
  545. package/dist/modules/transcription/WhisperWindowCoverage.d.ts +79 -0
  546. package/dist/modules/transcription/WhisperWindowCoverage.d.ts.map +1 -0
  547. package/dist/modules/transcription/WhisperWindowCoverage.js +129 -0
  548. package/dist/modules/transcription/WhisperWindowCoverage.js.map +1 -0
  549. package/dist/modules/transcription/WordTimingEstimator.d.ts +14 -0
  550. package/dist/modules/transcription/WordTimingEstimator.d.ts.map +1 -0
  551. package/dist/modules/transcription/WordTimingEstimator.js +33 -0
  552. package/dist/modules/transcription/WordTimingEstimator.js.map +1 -0
  553. package/dist/modules/transcription/index.d.ts +9 -2
  554. package/dist/modules/transcription/index.d.ts.map +1 -1
  555. package/dist/modules/transcription/index.js +6 -1
  556. package/dist/modules/transcription/index.js.map +1 -1
  557. package/dist/modules/video/RenderJob.d.ts +17 -0
  558. package/dist/modules/video/RenderJob.d.ts.map +1 -1
  559. package/dist/modules/video/RenderTimeMap.d.ts +50 -0
  560. package/dist/modules/video/RenderTimeMap.d.ts.map +1 -0
  561. package/dist/modules/video/RenderTimeMap.js +90 -0
  562. package/dist/modules/video/RenderTimeMap.js.map +1 -0
  563. package/dist/modules/video/index.d.ts +8 -1
  564. package/dist/modules/video/index.d.ts.map +1 -1
  565. package/dist/modules/video/index.js +4 -0
  566. package/dist/modules/video/index.js.map +1 -1
  567. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts +102 -0
  568. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts.map +1 -0
  569. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js +207 -0
  570. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js.map +1 -0
  571. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts +12 -52
  572. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts.map +1 -1
  573. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js +25 -190
  574. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js.map +1 -1
  575. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts +7 -0
  576. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts.map +1 -1
  577. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js +2 -2
  578. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js.map +1 -1
  579. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts +2 -0
  580. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts.map +1 -1
  581. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js +8 -2
  582. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js.map +1 -1
  583. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts +3 -0
  584. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts.map +1 -1
  585. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js +9 -2
  586. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js.map +1 -1
  587. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts +7 -0
  588. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts.map +1 -1
  589. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts +4 -2
  590. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts.map +1 -1
  591. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js +33 -23
  592. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js.map +1 -1
  593. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts +9 -2
  594. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts.map +1 -1
  595. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts +5 -2
  596. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts.map +1 -1
  597. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js +8 -2
  598. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js.map +1 -1
  599. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts +35 -0
  600. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts.map +1 -0
  601. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js +69 -0
  602. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js.map +1 -0
  603. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts +23 -0
  604. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts.map +1 -0
  605. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js +23 -0
  606. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js.map +1 -0
  607. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts +46 -0
  608. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts.map +1 -0
  609. package/dist/modules/video/mediabunny/painter/FramePainter.js +2 -0
  610. package/dist/modules/video/mediabunny/painter/FramePainter.js.map +1 -0
  611. package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts +24 -0
  612. package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts.map +1 -0
  613. package/dist/modules/video/mediabunny/painter/TopLayerSource.js +2 -0
  614. package/dist/modules/video/mediabunny/painter/TopLayerSource.js.map +1 -0
  615. package/package.json +13 -10
  616. package/dist/modules/document/Tag.d.ts.map +0 -1
  617. package/dist/modules/document/Tag.js.map +0 -1
  618. package/dist/modules/rendering/AlignmentConfig.d.ts +0 -21
  619. package/dist/modules/rendering/AlignmentConfig.d.ts.map +0 -1
  620. package/dist/modules/rendering/AlignmentConfig.js +0 -2
  621. package/dist/modules/rendering/AlignmentConfig.js.map +0 -1
  622. package/dist/modules/rendering/BoxEdges.d.ts.map +0 -1
  623. package/dist/modules/rendering/BoxEdges.js.map +0 -1
  624. package/dist/modules/rendering/ElementRenderOverrides.d.ts +0 -15
  625. package/dist/modules/rendering/ElementRenderOverrides.d.ts.map +0 -1
  626. package/dist/modules/rendering/ElementRenderOverrides.js +0 -24
  627. package/dist/modules/rendering/ElementRenderOverrides.js.map +0 -1
  628. package/dist/modules/rendering/InlineStyleMap.d.ts.map +0 -1
  629. package/dist/modules/rendering/InlineStyleMap.js.map +0 -1
  630. package/dist/modules/rendering/RenderingConfig.d.ts.map +0 -1
  631. package/dist/modules/rendering/RenderingConfig.js.map +0 -1
  632. package/dist/modules/rendering/ScopedRenderOverride.d.ts +0 -19
  633. package/dist/modules/rendering/ScopedRenderOverride.d.ts.map +0 -1
  634. package/dist/modules/rendering/ScopedRenderOverride.js.map +0 -1
  635. package/dist/modules/rendering/SegmentPaintRegionResolver.d.ts.map +0 -1
  636. package/dist/modules/rendering/SegmentPaintRegionResolver.js.map +0 -1
  637. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts +0 -58
  638. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts.map +0 -1
  639. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js +0 -132
  640. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js.map +0 -1
  641. package/dist/modules/rendering/VideoFrameLayerClass.d.ts.map +0 -1
  642. package/dist/modules/rendering/VideoFrameLayerClass.js +0 -21
  643. package/dist/modules/rendering/VideoFrameLayerClass.js.map +0 -1
  644. package/dist/modules/rendering/VideoFrameSource.d.ts.map +0 -1
  645. package/dist/modules/rendering/VideoFrameSource.js.map +0 -1
  646. package/dist/modules/transcription/BrowserAudioDecoder.d.ts +0 -13
  647. package/dist/modules/transcription/BrowserAudioDecoder.d.ts.map +0 -1
  648. package/dist/modules/transcription/BrowserAudioDecoder.js +0 -34
  649. package/dist/modules/transcription/BrowserAudioDecoder.js.map +0 -1
  650. /package/dist/modules/rendering/{BoxEdges.d.ts → types/BoxEdges.d.ts} +0 -0
  651. /package/dist/modules/rendering/{BoxEdges.js → types/BoxEdges.js} +0 -0
  652. /package/dist/modules/rendering/{InlineStyleMap.d.ts → types/InlineStyleMap.d.ts} +0 -0
  653. /package/dist/modules/rendering/{InlineStyleMap.js → types/InlineStyleMap.js} +0 -0
  654. /package/dist/modules/rendering/{RenderingConfig.js → types/RenderingConfig.js} +0 -0
  655. /package/dist/modules/rendering/{ScopedRenderOverride.js → types/ScopedRenderOverride.js} +0 -0
  656. /package/dist/modules/rendering/{VideoFrameSource.d.ts → types/VideoFrameSource.d.ts} +0 -0
  657. /package/dist/modules/rendering/{VideoFrameSource.js → types/VideoFrameSource.js} +0 -0
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Records what the decoder did in each pipeline window — how far its
3
+ * last real segment got, how many tokens it emitted, whether the loop
4
+ * guard cut it, whether it stopped mid-segment — and answers which
5
+ * audio regions were left uncovered.
6
+ *
7
+ * Segment boundaries are counted with window-local parity: within one
8
+ * window the decoder strictly alternates open / close starting at
9
+ * open, so odd-numbered events open a segment and even-numbered ones
10
+ * close it. The upstream streamer's own open/close labels are not
11
+ * trusted — its alternation state carries across windows, so one
12
+ * window that stops mid-segment mislabels every event that follows.
13
+ *
14
+ * Only segments whose close timestamp is strictly greater than their
15
+ * open timestamp count as "closed". A degenerate repetition loop can
16
+ * emit `<|t|>text<|t|>` pairs at a single timestamp forever — trusting
17
+ * those bogus closes leaves the whole loop tail looking legitimate
18
+ * and defeats every downstream cutoff.
19
+ */
20
+ export class WhisperWindowCoverage {
21
+ windows = [];
22
+ currentLastClosedEnd = null;
23
+ currentTokenCount = 0;
24
+ currentTimestampEvents = 0;
25
+ currentOpenTimestamp = null;
26
+ /** Feeds one segment-boundary timestamp, relative to the current window. */
27
+ recordTimestamp(timeWithinWindow) {
28
+ this.currentTimestampEvents += 1;
29
+ if (this.isOpenEvent()) {
30
+ this.currentOpenTimestamp = timeWithinWindow;
31
+ return;
32
+ }
33
+ if (this.isRealClose(timeWithinWindow)) {
34
+ this.currentLastClosedEnd = Math.max(this.currentLastClosedEnd ?? 0, timeWithinWindow);
35
+ }
36
+ this.currentOpenTimestamp = null;
37
+ }
38
+ isOpenEvent() {
39
+ return this.currentTimestampEvents % 2 === 1;
40
+ }
41
+ isRealClose(closeTimestamp) {
42
+ return this.currentOpenTimestamp !== null && closeTimestamp > this.currentOpenTimestamp;
43
+ }
44
+ /** Counts one generated token towards the current window. */
45
+ recordToken() {
46
+ this.currentTokenCount += 1;
47
+ }
48
+ /** Marks the end of the current window's generation pass. */
49
+ windowEnded(abortedByLoopGuard) {
50
+ this.windows.push({
51
+ lastClosedEndSeconds: this.currentLastClosedEnd,
52
+ tokenCount: this.currentTokenCount,
53
+ abortedByLoopGuard,
54
+ endedWithOpenSegment: this.currentTimestampEvents % 2 === 1,
55
+ });
56
+ this.currentLastClosedEnd = null;
57
+ this.currentTokenCount = 0;
58
+ this.currentTimestampEvents = 0;
59
+ this.currentOpenTimestamp = null;
60
+ }
61
+ /** Number of generation passes observed so far. */
62
+ get windowsObserved() {
63
+ return this.windows.length;
64
+ }
65
+ /**
66
+ * The uncovered regions among non-final windows. A window whose
67
+ * trustworthy coverage ends before the pipeline's window advance
68
+ * leaves the audio from that point up to the next window's start
69
+ * transcribed by nobody.
70
+ *
71
+ * A window is degenerate when the loop guard cut it or its token
72
+ * count reached `tokenCeiling` — either way it did not end by its
73
+ * own end-of-sequence, and its gap is not rescuable.
74
+ */
75
+ uncoveredGaps(advanceSeconds, tokenCeiling) {
76
+ const gaps = [];
77
+ for (let window = 0; window < this.windows.length - 1; window++) {
78
+ const record = this.windows[window];
79
+ if (!record)
80
+ continue;
81
+ const degenerate = this.isDegenerate(record, tokenCeiling);
82
+ const gapStart = this.gapStartFor(record, degenerate);
83
+ if (gapStart === null || gapStart >= advanceSeconds)
84
+ continue;
85
+ gaps.push({
86
+ startSeconds: window * advanceSeconds + gapStart,
87
+ endSeconds: (window + 1) * advanceSeconds,
88
+ rescuable: !degenerate,
89
+ });
90
+ }
91
+ return gaps;
92
+ }
93
+ /**
94
+ * The uncovered tail of the final window, or `null` when there is
95
+ * nothing trustworthy to report. Reported only when that window's
96
+ * generation was cut from outside or stopped mid-segment. A clean
97
+ * close is trusted as the genuine end of speech: with no following
98
+ * window, an early-but-clean close cannot be told apart from a video
99
+ * that simply ends in silence. Never rescuable.
100
+ */
101
+ finalWindowGap(advanceSeconds, tokenCeiling, audioEndSeconds) {
102
+ const record = this.windows[this.windows.length - 1];
103
+ if (!record)
104
+ return null;
105
+ const degenerate = this.isDegenerate(record, tokenCeiling);
106
+ if (!degenerate && !record.endedWithOpenSegment)
107
+ return null;
108
+ const startSeconds = (this.windows.length - 1) * advanceSeconds + (record.lastClosedEndSeconds ?? 0);
109
+ if (startSeconds >= audioEndSeconds)
110
+ return null;
111
+ return { startSeconds, endSeconds: audioEndSeconds, rescuable: false };
112
+ }
113
+ isDegenerate(record, tokenCeiling) {
114
+ return record.abortedByLoopGuard || record.tokenCount >= tokenCeiling;
115
+ }
116
+ /**
117
+ * Where the window's trustworthy coverage ends. A clean window that
118
+ * closed no segment reports `null`: re-decoding its identical input
119
+ * is deterministic and would reproduce the same empty result. A
120
+ * degenerate window with no closed segment still gaps from zero —
121
+ * its region gets dropped, not re-decoded.
122
+ */
123
+ gapStartFor(record, degenerate) {
124
+ if (record.lastClosedEndSeconds !== null)
125
+ return record.lastClosedEndSeconds;
126
+ return degenerate ? 0 : null;
127
+ }
128
+ }
129
+ //# sourceMappingURL=WhisperWindowCoverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhisperWindowCoverage.js","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperWindowCoverage.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,qBAAqB;IACf,OAAO,GAAmB,EAAE,CAAC;IACtC,oBAAoB,GAAkB,IAAI,CAAC;IAC3C,iBAAiB,GAAG,CAAC,CAAC;IACtB,sBAAsB,GAAG,CAAC,CAAC;IAC3B,oBAAoB,GAAkB,IAAI,CAAC;IAEnD,4EAA4E;IAC5E,eAAe,CAAC,gBAAwB;QACtC,IAAI,CAAC,sBAAsB,IAA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AAC,GAAG,cAAc,GAAG,CAAC,MAAM,CAAC,oBAAoB,IAAI,CAAC,CAAC,CAAC;QACrG,IAAI,YAAY,IAAI,eAAe;YAAE,OAAO,IAAI,CAAC;QACjD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACzE,CAAC;IAEO,YAAY,CAAC,MAAoB,EAAE,YAAoB;QAC7D,OAAO,MAAM,CAAC,kBAAkB,IAAI,MAAM,CAAC,UAAU,IAAI,YAAY,CAAC;IACxE,CAAC;IAED;;;;;;OAMG;IACK,WAAW,CAAC,MAAoB,EAAE,UAAmB;QAC3D,IAAI,MAAM,CAAC,oBAAoB,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC,oBAAoB,CAAC;QAC7E,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import { Word } from '../document/Word';
2
+ /**
3
+ * Invents a window for each word of a span the source only timed as a
4
+ * whole, sharing the span out in proportion to how long each word is to
5
+ * write. A rough stand-in for measured timings, and the best a file
6
+ * that never recorded them can offer.
7
+ *
8
+ * A span of no length, or words that are all empty, leaves every word
9
+ * covering the whole span rather than dividing by zero.
10
+ */
11
+ export declare class WordTimingEstimator {
12
+ spread(tokens: ReadonlyArray<string>, startSeconds: number, endSeconds: number): ReadonlyArray<Word>;
13
+ }
14
+ //# sourceMappingURL=WordTimingEstimator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WordTimingEstimator.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WordTimingEstimator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;;;;;;GAQG;AACH,qBAAa,mBAAmB;IAE9B,MAAM,CACJ,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,EAC7B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,aAAa,CAAC,IAAI,CAAC;CAmBvB"}
@@ -0,0 +1,33 @@
1
+ import { TimeFragment } from '../document/TimeFragment';
2
+ import { Word } from '../document/Word';
3
+ /**
4
+ * Invents a window for each word of a span the source only timed as a
5
+ * whole, sharing the span out in proportion to how long each word is to
6
+ * write. A rough stand-in for measured timings, and the best a file
7
+ * that never recorded them can offer.
8
+ *
9
+ * A span of no length, or words that are all empty, leaves every word
10
+ * covering the whole span rather than dividing by zero.
11
+ */
12
+ export class WordTimingEstimator {
13
+ spread(tokens, startSeconds, endSeconds) {
14
+ const totalWeight = tokens.reduce((sum, token) => sum + token.length, 0);
15
+ const duration = endSeconds - startSeconds;
16
+ if (totalWeight === 0 || duration <= 0) {
17
+ return tokens.map((token) => new Word({
18
+ text: token,
19
+ time: new TimeFragment(startSeconds, endSeconds),
20
+ }));
21
+ }
22
+ const words = [];
23
+ let elapsedWeight = 0;
24
+ for (const token of tokens) {
25
+ const wordStart = startSeconds + (elapsedWeight / totalWeight) * duration;
26
+ elapsedWeight += token.length;
27
+ const wordEnd = startSeconds + (elapsedWeight / totalWeight) * duration;
28
+ words.push(new Word({ text: token, time: new TimeFragment(wordStart, wordEnd) }));
29
+ }
30
+ return words;
31
+ }
32
+ }
33
+ //# sourceMappingURL=WordTimingEstimator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WordTimingEstimator.js","sourceRoot":"","sources":["../../../src/modules/transcription/WordTimingEstimator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,OAAO,mBAAmB;IAE9B,MAAM,CACJ,MAA6B,EAC7B,YAAoB,EACpB,UAAkB;QAElB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC;QAC3C,IAAI,WAAW,KAAK,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;YACvC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC;gBACpC,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,IAAI,YAAY,CAAC,YAAY,EAAE,UAAU,CAAC;aACjD,CAAC,CAAC,CAAC;QACN,CAAC;QACD,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,QAAQ,CAAC;YAC1E,aAAa,IAAI,KAAK,CAAC,MAAM,CAAC;YAC9B,MAAM,OAAO,GAAG,YAAY,GAAG,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,QAAQ,CAAC;YACxE,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -1,8 +1,15 @@
1
- export type { Transcriber, TranscriberOptions, TranscriberProgressEvent, } from '../transcription/Transcriber';
1
+ export type { Transcriber, TranscriberOptions, TranscriberProgressEvent, UntranscribedRegion, } from '../transcription/Transcriber';
2
2
  export type { AudioDecoder } from '../transcription/AudioDecoder';
3
3
  export { PreDecodedAudioDecoder } from '../transcription/PreDecodedAudioDecoder';
4
- export { BrowserAudioDecoder } from '../transcription/BrowserAudioDecoder';
4
+ export { MediaBunnyAudioDecoder } from '../transcription/MediaBunnyAudioDecoder';
5
5
  export { PassthroughTranscriber } from '../transcription/PassthroughTranscriber';
6
6
  export { SrtTranscriber } from '../transcription/SrtTranscriber';
7
+ export { VttTranscriber } from '../transcription/VttTranscriber';
8
+ export { SubtitleFileUnreadableError } from '../transcription/SubtitleFileUnreadableError';
9
+ export type { CueParseResult } from '../transcription/CueParseResult';
7
10
  export { WhisperTranscriber, WHISPER_SAMPLE_RATE, type WhisperModel, type WhisperDevice, type WhisperTranscriberConfig, } from '../transcription/WhisperTranscriber';
11
+ export { WhisperDeviceUnavailableError } from '../transcription/WhisperDeviceUnavailableError';
12
+ export type { ModelFileCache } from '../transcription/ModelFileCache';
13
+ export { CacheStorageModelFileCache } from '../transcription/CacheStorageModelFileCache';
14
+ export { ModelFileCacheUnavailableError } from '../transcription/ModelFileCacheUnavailableError';
8
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC9B,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AACrG,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC"}
@@ -1,6 +1,11 @@
1
1
  export { PreDecodedAudioDecoder } from '../transcription/PreDecodedAudioDecoder';
2
- export { BrowserAudioDecoder } from '../transcription/BrowserAudioDecoder';
2
+ export { MediaBunnyAudioDecoder } from '../transcription/MediaBunnyAudioDecoder';
3
3
  export { PassthroughTranscriber } from '../transcription/PassthroughTranscriber';
4
4
  export { SrtTranscriber } from '../transcription/SrtTranscriber';
5
+ export { VttTranscriber } from '../transcription/VttTranscriber';
6
+ export { SubtitleFileUnreadableError } from '../transcription/SubtitleFileUnreadableError';
5
7
  export { WhisperTranscriber, WHISPER_SAMPLE_RATE, } from '../transcription/WhisperTranscriber';
8
+ export { WhisperDeviceUnavailableError } from '../transcription/WhisperDeviceUnavailableError';
9
+ export { CacheStorageModelFileCache } from '../transcription/CacheStorageModelFileCache';
10
+ export { ModelFileCacheUnavailableError } from '../transcription/ModelFileCacheUnavailableError';
6
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAIpB,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AAEjG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAIpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAErG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { Document } from '../document/Document';
2
2
  import type { SubtitleStyle } from '../rendering/SubtitleFrameRenderer';
3
+ import type { TimeRange } from '../video/RenderTimeMap';
4
+ import type { TopLayerSource } from '../video/mediabunny/painter/TopLayerSource';
3
5
  export type OutputFormat = 'mp4' | 'webm';
4
6
  export type RenderQuality = 'low' | 'medium' | 'high' | 'very-high';
5
7
  /**
@@ -44,6 +46,12 @@ export interface RenderJob {
44
46
  * SVG `foreignObject`. Self-contained: any styling must be inline.
45
47
  */
46
48
  overlayHtml?: string;
49
+ /**
50
+ * Optional per-frame layer painted on top of the captions. Used by
51
+ * effects that must occlude the caption raster (e.g. a person
52
+ * cutout). When unset, no top layer is drawn.
53
+ */
54
+ topLayer?: TopLayerSource;
47
55
  outputFormat?: OutputFormat;
48
56
  quality?: RenderQuality;
49
57
  /**
@@ -67,6 +75,15 @@ export interface RenderJob {
67
75
  * via `RenderResult.blob`.
68
76
  */
69
77
  outputStream?: WritableStream<RenderOutputChunk>;
78
+ /**
79
+ * Time windows (in seconds, source-time) to exclude from the
80
+ * output. Each excluded window collapses to a single point in the
81
+ * output timeline: video frames and audio inside the window are
82
+ * dropped, and everything after the window is shifted earlier by
83
+ * the window's duration. Ranges should be non-overlapping; the
84
+ * renderer sorts them internally.
85
+ */
86
+ skipRanges?: ReadonlyArray<TimeRange>;
70
87
  /**
71
88
  * Called when the input had an audio track but the renderer has to
72
89
  * drop it. Not invoked when the input has no audio at all.
@@ -1 +1 @@
1
- {"version":3,"file":"RenderJob.d.ts","sourceRoot":"","sources":["../../../src/modules/video/RenderJob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAE9E,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAA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;;OAKG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACjD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACtC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A half-open time window in seconds. The end is exclusive: a sample
3
+ * at `endSec` is considered outside the range.
4
+ */
5
+ export interface TimeRange {
6
+ readonly startSec: number;
7
+ readonly endSec: number;
8
+ }
9
+ /**
10
+ * Maps source timestamps to output timestamps for a render that
11
+ * excludes one or more time windows. Source positions inside an
12
+ * excluded window collapse to the window's start in output time;
13
+ * positions past a window are shifted earlier by the cumulative
14
+ * skipped duration.
15
+ *
16
+ * Constructed once per render and queried per video frame and per
17
+ * audio packet/sample. Ranges are sorted internally and assumed
18
+ * non-overlapping (callers should merge touching/overlapping
19
+ * intervals before passing them in).
20
+ *
21
+ * An empty mapper is the identity: `isSkipped` is always false and
22
+ * `toOutputTime` returns the input unchanged.
23
+ */
24
+ export declare class RenderTimeMap {
25
+ private readonly sortedRanges;
26
+ constructor(ranges: ReadonlyArray<TimeRange>);
27
+ isEmpty(): boolean;
28
+ isSkipped(sourceTimeSec: number): boolean;
29
+ /**
30
+ * Returns the skipped range that contains the given source-time
31
+ * position, or `null` when the position lies outside every range.
32
+ */
33
+ findContainingRange(sourceTimeSec: number): TimeRange | null;
34
+ /**
35
+ * Returns the first skipped range whose start lies strictly after
36
+ * the given source-time position, or `null` when no such range
37
+ * exists.
38
+ */
39
+ findFirstRangeStartingAfter(sourceTimeSec: number): TimeRange | null;
40
+ toOutputTime(sourceTimeSec: number): number;
41
+ /**
42
+ * Inverse of {@link toOutputTime}. An output position that lands
43
+ * exactly on a collapsed window — the multiple source positions
44
+ * mapping to the same output value — resolves to the window's
45
+ * right-hand source side so playback continues past the skip.
46
+ */
47
+ toSourceTime(outputTimeSec: number): number;
48
+ totalSkipDuration(): number;
49
+ }
50
+ //# sourceMappingURL=RenderTimeMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderTimeMap.d.ts","sourceRoot":"","sources":["../../../src/modules/video/RenderTimeMap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAa;IAExB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA2B;gBAE5C,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC;IAI5C,OAAO,IAAI,OAAO;IAIlB,SAAS,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;IAQzC;;;OAGG;IACH,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAQ5D;;;;OAIG;IACH,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAOpE,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAU3C;;;;;OAKG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAS3C,iBAAiB,IAAI,MAAM;CAK5B"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Maps source timestamps to output timestamps for a render that
3
+ * excludes one or more time windows. Source positions inside an
4
+ * excluded window collapse to the window's start in output time;
5
+ * positions past a window are shifted earlier by the cumulative
6
+ * skipped duration.
7
+ *
8
+ * Constructed once per render and queried per video frame and per
9
+ * audio packet/sample. Ranges are sorted internally and assumed
10
+ * non-overlapping (callers should merge touching/overlapping
11
+ * intervals before passing them in).
12
+ *
13
+ * An empty mapper is the identity: `isSkipped` is always false and
14
+ * `toOutputTime` returns the input unchanged.
15
+ */
16
+ export class RenderTimeMap {
17
+ sortedRanges;
18
+ constructor(ranges) {
19
+ this.sortedRanges = [...ranges].sort((a, b) => a.startSec - b.startSec);
20
+ }
21
+ isEmpty() {
22
+ return this.sortedRanges.length === 0;
23
+ }
24
+ isSkipped(sourceTimeSec) {
25
+ for (const range of this.sortedRanges) {
26
+ if (sourceTimeSec < range.startSec)
27
+ return false;
28
+ if (sourceTimeSec < range.endSec)
29
+ return true;
30
+ }
31
+ return false;
32
+ }
33
+ /**
34
+ * Returns the skipped range that contains the given source-time
35
+ * position, or `null` when the position lies outside every range.
36
+ */
37
+ findContainingRange(sourceTimeSec) {
38
+ for (const range of this.sortedRanges) {
39
+ if (sourceTimeSec < range.startSec)
40
+ return null;
41
+ if (sourceTimeSec < range.endSec)
42
+ return range;
43
+ }
44
+ return null;
45
+ }
46
+ /**
47
+ * Returns the first skipped range whose start lies strictly after
48
+ * the given source-time position, or `null` when no such range
49
+ * exists.
50
+ */
51
+ findFirstRangeStartingAfter(sourceTimeSec) {
52
+ for (const range of this.sortedRanges) {
53
+ if (range.startSec > sourceTimeSec)
54
+ return range;
55
+ }
56
+ return null;
57
+ }
58
+ toOutputTime(sourceTimeSec) {
59
+ let skipped = 0;
60
+ for (const range of this.sortedRanges) {
61
+ if (sourceTimeSec < range.startSec)
62
+ break;
63
+ const end = Math.min(sourceTimeSec, range.endSec);
64
+ skipped += end - range.startSec;
65
+ }
66
+ return sourceTimeSec - skipped;
67
+ }
68
+ /**
69
+ * Inverse of {@link toOutputTime}. An output position that lands
70
+ * exactly on a collapsed window — the multiple source positions
71
+ * mapping to the same output value — resolves to the window's
72
+ * right-hand source side so playback continues past the skip.
73
+ */
74
+ toSourceTime(outputTimeSec) {
75
+ let sourceTime = outputTimeSec;
76
+ for (const range of this.sortedRanges) {
77
+ if (sourceTime < range.startSec)
78
+ break;
79
+ sourceTime += range.endSec - range.startSec;
80
+ }
81
+ return sourceTime;
82
+ }
83
+ totalSkipDuration() {
84
+ let total = 0;
85
+ for (const range of this.sortedRanges)
86
+ total += range.endSec - range.startSec;
87
+ return total;
88
+ }
89
+ }
90
+ //# sourceMappingURL=RenderTimeMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderTimeMap.js","sourceRoot":"","sources":["../../../src/modules/video/RenderTimeMap.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,aAAa;IAEP,YAAY,CAA2B;IAExD,YAAY,MAAgC;QAC1C,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,SAAS,CAAC,aAAqB;QAC7B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtC,IAAI,aAAa,GAAG,KAAK,CAAC,QAAQ;gBAAE,OAAO,KAAK,CAAC;YACjD,IAAI,aAAa,GAAG,KAAK,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;QAChD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;OAGG;IACH,mBAAmB,CAAC,aAAqB;QACvC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACt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AC,QAAQ,CAAC;QAC9E,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -2,6 +2,12 @@ export type { VideoRenderer } from '../video/VideoRenderer';
2
2
  export type { RenderJob, RenderResult, RenderProgress, RenderOutputChunk, OutputFormat, RenderQuality, AudioDiscardReason, FallbackDecoderInfo, } from '../video/RenderJob';
3
3
  export { MediaBunnyVideoRenderer } from '../video/mediabunny/MediaBunnyVideoRenderer';
4
4
  export type { MediaBunnyVideoRendererConfig } from '../video/mediabunny/MediaBunnyVideoRenderer';
5
+ export { MediaBunnyTranscodeCoordinator } from '../video/mediabunny/MediaBunnyTranscodeCoordinator';
6
+ export type { MediaBunnyTranscodeCoordinatorConfig, MediaBunnyTranscodeRequest, MediaBunnyTranscodeResult, } from '../video/mediabunny/MediaBunnyTranscodeCoordinator';
7
+ export type { FramePainter } from '../video/mediabunny/painter/FramePainter';
8
+ export { CaptionsOverlayFramePainter } from '../video/mediabunny/painter/CaptionsOverlayFramePainter';
9
+ export { CaptionsOverlayFramePainterFactory } from '../video/mediabunny/painter/CaptionsOverlayFramePainterFactory';
10
+ export { RenderTimeMap } from '../video/RenderTimeMap';
5
11
  export type { CodecPolicy, VideoCodecResolution, VideoCodecResolutionRequest, } from '../video/mediabunny/codec/CodecPolicy';
6
12
  export { DefaultCodecPolicy } from '../video/mediabunny/codec/DefaultCodecPolicy';
7
13
  export type { VideoFrameDecoder, DecodedVideoFrame, } from '../video/mediabunny/frame/VideoFrameDecoder';
@@ -9,7 +15,7 @@ export type { VideoFrameDecoderFactory, VideoFrameDecoderRequest, } from '../vid
9
15
  export { DefaultVideoFrameDecoderFactory } from '../video/mediabunny/frame/DefaultVideoFrameDecoderFactory';
10
16
  export { WebCodecsVideoFrameDecoder } from '../video/mediabunny/frame/WebCodecsVideoFrameDecoder';
11
17
  export { HtmlVideoElementVideoFrameDecoder } from '../video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder';
12
- export type { VideoTrackEncoder } from '../video/mediabunny/encoder/VideoTrackEncoder';
18
+ export type { VideoTrackEncoder, PaintFrame } from '../video/mediabunny/encoder/VideoTrackEncoder';
13
19
  export type { VideoTrackEncoderFactory, VideoTrackEncoderFactoryRequest, } from '../video/mediabunny/encoder/VideoTrackEncoderFactory';
14
20
  export { MediaBunnyCanvasVideoTrackEncoder, } from '../video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder';
15
21
  export type { MediaBunnyCanvasVideoTrackEncoderConfig, } from '../video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder';
@@ -20,6 +26,7 @@ export type { SubtitleLayerSource } from '../video/mediabunny/caption/SubtitleLa
20
26
  export { BatchedSubtitleLayerSource } from '../video/mediabunny/caption/BatchedSubtitleLayerSource';
21
27
  export { VideoBoundSubtitleLayerSource } from '../video/mediabunny/caption/VideoBoundSubtitleLayerSource';
22
28
  export { ComposedSubtitleLayerSource } from '../video/mediabunny/caption/ComposedSubtitleLayerSource';
29
+ export type { TopLayerSource } from '../video/mediabunny/painter/TopLayerSource';
23
30
  export type { AudioTrackBridge } from '../video/mediabunny/audio/AudioTrackBridge';
24
31
  export type { AudioTrackBridgeFactory, AudioTrackBridgeRequest, } from '../video/mediabunny/audio/AudioTrackBridgeFactory';
25
32
  export { DefaultAudioTrackBridgeFactory } from '../video/mediabunny/audio/DefaultAudioTrackBridgeFactory';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/video/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EACV,SAAS,EACT,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,YAAY,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAEvG,YAAY,EACV,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,2DAA2D,CAAC;AACtG,YAAY,EACV,+BAA+B,GAChC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAElG,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gEAAgE,CAAC"}
@@ -1,4 +1,8 @@
1
1
  export { MediaBunnyVideoRenderer } from '../video/mediabunny/MediaBunnyVideoRenderer';
2
+ export { MediaBunnyTranscodeCoordinator } from '../video/mediabunny/MediaBunnyTranscodeCoordinator';
3
+ export { CaptionsOverlayFramePainter } from '../video/mediabunny/painter/CaptionsOverlayFramePainter';
4
+ export { CaptionsOverlayFramePainterFactory } from '../video/mediabunny/painter/CaptionsOverlayFramePainterFactory';
5
+ export { RenderTimeMap } from '../video/RenderTimeMap';
2
6
  export { DefaultCodecPolicy } from '../video/mediabunny/codec/DefaultCodecPolicy';
3
7
  export { DefaultVideoFrameDecoderFactory } from '../video/mediabunny/frame/DefaultVideoFrameDecoderFactory';
4
8
  export { WebCodecsVideoFrameDecoder } from '../video/mediabunny/frame/WebCodecsVideoFrameDecoder';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/video/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAQ5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAUxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,mEAAmE,CAAC;AAOtH,OAAO,EACL,iCAAiC,GAClC,MAAM,qEAAqE,CAAC;AAI7E,OAAO,EACL,wCAAwC,GACzC,MAAM,4EAA4E,CAAC;AAGpF,OAAO,EA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AAC;AAC1G,OAAO,EAAE,6BAA6B,EAAE,MAAM,iEAAiE,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+DAA+D,CAAC;AAQ5G,OAAO,EAAE,8BAA8B,EAAE,MAAM,gEAAgE,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAI1G,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAItG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAOlG,OAAO,EAAE,6BAA6B,EAAE,MAAM,gEAAgE,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { RenderTimeMap } from '../../video/RenderTimeMap';
2
+ import type { OutputFormat, RenderOutputChunk, RenderProgress, RenderQuality, AudioDiscardReason, FallbackDecoderInfo } from '../../video/RenderJob';
3
+ import type { CodecPolicy } from '../../video/mediabunny/codec/CodecPolicy';
4
+ import type { VideoFrameDecoderFactory } from '../../video/mediabunny/frame/VideoFrameDecoderFactory';
5
+ import type { AudioTrackBridgeFactory } from '../../video/mediabunny/audio/AudioTrackBridgeFactory';
6
+ import type { OutputTargetBuilder } from '../../video/mediabunny/output/OutputTargetBuilder';
7
+ import type { VideoTrackEncoderFactory } from '../../video/mediabunny/encoder/VideoTrackEncoderFactory';
8
+ import type { FramePainter } from '../../video/mediabunny/painter/FramePainter';
9
+ export interface MediaBunnyTranscodeCoordinatorConfig {
10
+ videoFrameDecoderFactory: VideoFrameDecoderFactory;
11
+ videoTrackEncoderFactory: VideoTrackEncoderFactory;
12
+ audioTrackBridgeFactory: AudioTrackBridgeFactory;
13
+ outputTargetBuilder: OutputTargetBuilder;
14
+ }
15
+ export interface MediaBunnyTranscodeRequest {
16
+ source: File;
17
+ /**
18
+ * Resolves the codec, bitrate, and encoder knobs for this run. Per-request
19
+ * so consumers can supply a fixed policy (e.g. a proxy generator that
20
+ * always wants low-bitrate AVC) without swapping the coordinator instance.
21
+ */
22
+ codecPolicy: CodecPolicy;
23
+ /**
24
+ * Owns the per-frame pixel work. See {@link FramePainter} for the
25
+ * lifecycle contract.
26
+ */
27
+ painter: FramePainter;
28
+ /**
29
+ * Target output dimensions. When omitted, the coordinator keeps the
30
+ * input track's intrinsic display dimensions. When set, the source
31
+ * frames are painted at these dimensions; the coordinator never
32
+ * upscales beyond the source and snaps both axes to even numbers,
33
+ * which most hardware video encoders require. Callers are
34
+ * responsible for keeping the aspect ratio consistent — the
35
+ * coordinator does not letterbox or crop.
36
+ */
37
+ outputResolution?: {
38
+ width: number;
39
+ height: number;
40
+ };
41
+ outputFormat?: OutputFormat;
42
+ quality?: RenderQuality;
43
+ /**
44
+ * Sink for the encoded bytes. When set, the coordinator writes chunks
45
+ * to it as the encoder produces them and the result's `blob` is
46
+ * `null`. When unset, the encoded file accumulates in memory and is
47
+ * returned via the result's `blob`.
48
+ */
49
+ outputStream?: WritableStream<RenderOutputChunk>;
50
+ /**
51
+ * Time windows to exclude from the output. Frames and audio inside
52
+ * each window are dropped, and everything after is shifted earlier by
53
+ * the window's duration. Defaults to an empty map (nothing skipped).
54
+ */
55
+ timeMap?: RenderTimeMap;
56
+ onProgress?: (progress: RenderProgress) => void;
57
+ onAudioDiscarded?: (reason: AudioDiscardReason) => void;
58
+ confirmFallbackDecoder?: (info: FallbackDecoderInfo) => Promise<boolean>;
59
+ }
60
+ export interface MediaBunnyTranscodeResult {
61
+ /** Encoded file in memory, or `null` when the request supplied `outputStream`. */
62
+ blob: Blob | null;
63
+ mimeType: string;
64
+ /** Final output width, after clamping to the source and snapping to even. */
65
+ width: number;
66
+ /** Final output height, after clamping to the source and snapping to even. */
67
+ height: number;
68
+ }
69
+ /**
70
+ * Runs one mediabunny transcode: opens the source input, resolves the
71
+ * output dimensions / frame rate / duration, wires the encoder and the
72
+ * audio bridge, and drives the decode → paint → encode loop.
73
+ *
74
+ * Consumer-specific per-frame composition (captions, overlay, raw-frame
75
+ * passthrough) lives behind the request's {@link FramePainter}; codec
76
+ * choice, container format, time-range skipping, and audio-loss and
77
+ * fallback-decoder notifications are per-request inputs. The coordinator
78
+ * itself knows nothing about documents, styles, or overlays — those
79
+ * live inside the painter.
80
+ *
81
+ * One run at a time per instance; concurrent {@link execute} calls on
82
+ * the same instance are not supported.
83
+ */
84
+ export declare class MediaBunnyTranscodeCoordinator {
85
+ private readonly videoFrameDecoderFactory;
86
+ private readonly videoTrackEncoderFactory;
87
+ private readonly audioTrackBridgeFactory;
88
+ private readonly outputTargetBuilder;
89
+ constructor(config: MediaBunnyTranscodeCoordinatorConfig);
90
+ execute(request: MediaBunnyTranscodeRequest): Promise<MediaBunnyTranscodeResult>;
91
+ private runEncodeLoop;
92
+ private toEncoderConfig;
93
+ private computeDuration;
94
+ private resolveOutputDimensions;
95
+ private toEven;
96
+ private readFrameRate;
97
+ private toProgress;
98
+ private safeCancel;
99
+ private assertWebCodecsAvailable;
100
+ private buildResult;
101
+ }
102
+ //# sourceMappingURL=MediaBunnyTranscodeCoordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaBunnyTranscodeCoordinator.d.ts","sourceRoot":"","sources":["../../../../src/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAwB,MAAM,6CAA6C,CAAC;AACrG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AAEzG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAEvG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAC3G,O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