RusseII / interviews.deephire.com

Deephire candidate video interviews
https://interviews.deephire.com
3 stars 0 forks source link

bug-fix/show-recording-preview #143

Closed techromantic closed 3 years ago

techromantic commented 3 years ago

Referencing this issue which I think was on the wrong repo?

Getting a playback preview is the desired and expected behavior.

According to the [accept-screen UI] https://cameratag.com/v13/docs/camera_custom) it should, but using camera tag's demo we see 'broken' behavior. When finishing the first recording the frame is not displayed for a preview. Its only after the first playback that a frame is displayed.

Looking through their source, it looks like they actually show the player when recording has stopped and that this player is empty (because it hasn't started playing anything) (Line beginning with: CameraTag.observe(dom_id, "recordingStopped", function() {)

There's a few ways to fix this, they're all kind of hacky. One is to start and stop playback after a recordingStopped event. There's a slight flicker but it works.

The other is to continue to show the recorder even after recording has stopped, since the recorder will have the last frame of the video. Because we do this - we'll also have to explicitly show the player and recorder on the recording and playback starting events.

This feels a lot nicer. And is what I went with in the implementation. Tested briefly and it seems to work.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/russeii/interviews-deephire-com/bmyu3u5o3
✅ Preview: https://interviews-deephire-com-git-bug-fix-show-recording-preview.russeii.vercel.app

RusseII commented 3 years ago

@techromantic great work with this. Seems to work perfectly! I agree that the 2nd implementation is better.

techromantic commented 3 years ago

@RusseII thanks m8 - woo first PR merged!