react-insta-stories icon indicating copy to clipboard operation
react-insta-stories copied to clipboard

Not start the story before content is loaded

Open orizvida opened this issue 3 years ago • 1 comments

Hi, I am trying to show a video in the story, the video takes a second to load and the story timer starts before the video is loaded, When trying to set isPaused to true it just ignores it and plays automatically, How can I control the start and pause of the story? basically, I want to set the story to start when I have a ready event from my video component, my video content looks like that: <div style={{ width: '100%', height: '100%' }}> <VideoJS options={options} onReady={handlePlayerReady} /> </div>

(I can't use the custom video you provide because I am streaming dash video and not mp4)

Thakns!

orizvida avatar Jan 04 '22 10:01 orizvida

Hey @orizvida , isPaused is a state variable, so setting it directly will not work. You'll have to use the action prop instead as action('pause') and action('play').

mohitk05 avatar Jan 07 '22 16:01 mohitk05