Expo Video if playbackStatus.didJustFinish

Hello there,

I’m having an issue with the expo video module.
I use playbackStatus to check wether or not a video has ended and to perform an action if it’s the case.

Everythig works properly on iOS, the alert is displayed as soon as the video ends. But it fails as soon as I try on Android (same code), the condition “if (playbackStatus.didJustFinish){” is never true even though the _onPlaybackStatusUpdate works fine.

Any help would be greatly appreciated, since I can’t find anything related anywhere :frowning:

Kind regards

import { Video } from 'expo';

...

_onPlaybackStatusUpdate = playbackStatus => {
    if (playbackStatus.didJustFinish){
      alert('test');
    }
  };

...

 <Video
              source={ require('../assets/video1.mp4') }
              ...
              onPlaybackStatusUpdate= { (playbackStatus) => this._onPlaybackStatusUpdate(playbackStatus) }




Hey @jbmeneroud,

Can you see if you’re able to create a reproducible example of this with Snack? If you are, it’s likely a bug and the best course of action would be to create an issue on our expo/expo repo. Just be sure to add all relevant details regarding the bug if you create a ticket such as SDK version, physical device or simulator, etc.

Cheers,

Adam

Hello @adamjnav,

thanks for the quick reply.
Just created a Snack with my main issue, just to keep it simple:

I use expo 30.0.1
I test on Samsung Galaxy S8 And Galaxy Tab (Physical) and iPhone 8 and iPad 2 (Physical and Simulator)

Everything runs as expected on iOS, but like I said, on Android, the condition that says that video is ended is never set to true and the alert is never called.

Kind regards.
JB

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.