useVideoPlaybackState(): String (enum)

Returns the video playback state of the composition. You can import PlaybackStateType from the same file to get the enum values:

Return type

String'playing' or 'postroll' (PlaybackStateType.PLAYING or PlaybackStateType.POSTROLL). When the playback state evalutes to 'playing', the composition is currently playing. When it evaluates to 'postroll', the composition is transitioning to a stop state.

You can end your composition with any visuals you want to display at the end of the output video file (e.g. end titles) when the playback state is 'postroll'. The postroll will be at least 300ms long, allowing you to also render an optional fade.

Sample code

Additional examples of usage for this custom hook can be found in the source code for the VCS SDK.