misc¶
- class janim.timeline.misc.AudiosAndSubtitlesMixin(*args, **kwargs)¶
Bases:
AudiosMixin,SubtitlesMixinIntegrates
AudioMixinandSubtitlesMixin, providing additional functionality forTimelineHint
All methods in this class can be used directly in
Timeline- aas(file_path: str, subtitle: str | Iterable[str], **kwargs) TimeRange¶
Short form of
audio_and_subtitle()
- audio_and_subtitle(file_path: str, subtitle: str | Iterable[str], *, clip: tuple[float, float] | None | EllipsisType = Ellipsis, delay: float = 0, mul: float | Iterable[float] | None = None, **subtitle_kwargs) TimeRange¶
Plays audio and displays subtitles during playback
- Parameters:
file_path – Path to the audio file
subtitle – Subtitles displayed during audio playback
clip – The clipping interval of the audio. Defaults to
clip=...(ellipsis), which means the clipping interval is determined automatically by removing leading and trailing silence. Setclip=Noneto disable automatic clipping and keep the full audio length. You can also set(begin, end)to manually specify the clipping intervalmul – Volume scaling factor
**subtitle_kwargs – Parameters passed to
subtitle()
- class janim.timeline.misc.DebugMixin(*args, **kwargs)¶
Bases:
TimelineCoreProvides some debugging functionality for
TimelineHint
All methods in this class can be used directly in
Timeline- debug(item: Item, msg: str | None = None) None¶
Display the item’s animation stack in the timeline
Tip
A yellow bar displayed in the timeline indicates in which ranges the item is visible
- static fmt_time(t: float) str¶
- dbg_time(ext_msg: str = '') None¶