Capítulo 334 de 988

Chapter 334: The Player buffer state

Core Idea

_available from 4. 0.

Key Concepts

  • TL;DR
  • Mechanism
  • Activating the buffer state
  • Possible states
  • Listening to buffer events
  • Components with built-in buffering
  • Indicating buffering in the UI
  • Upcoming changes in Remotion 5.0

Code Examples

const MyComp: React.FC = () => {
  const buffer = useBufferState();

  React.useEffect(() => {
    const delayHandle = buffer.delayPlayback();

    setTimeout(() => {
      delayHandle.unblock();
    }, 5000);

    return () => {
      delayHandle.unblock();
    };
  }, []);

  return null;
};
  • What it demonstrates: Usage pattern for The Player buffer state from the official docs.

Key Takeaways

  1. Understand tl;dr when working with The Player buffer state.
  2. Understand mechanism when working with The Player buffer state.
  3. Understand activating the buffer state when working with The Player buffer state.
  4. Understand possible states when working with The Player buffer state.
  5. Understand listening to buffer events when working with The Player buffer state.

Connects To

  • Clipper: related page in the Studio, Player & Editing section.
  • Design Systems: related page in the Studio, Player & Editing section.
  • Editor Starter: related page in the Studio, Player & Editing section.