VideoStream does not show video after setting paused to False

When I create a VideoStream, then set paused to True and then back to False the widget does not resume to show the camera feed. The steam can be resumed by right clicking the video and than clicking play or display the widget in a new cell (in a jupyter notebook).

Below is a minimum example:

# Cell 1
import panel as pn
import time
pn.extension()

# Cell 2
# create VideoStream
video = pn.widgets.VideoStream(timeout=100, paused=False)
video

# Cell 3
time.sleep(3)
video.paused = True
time.sleep(1)
video.paused = False

It’s the same for the example from the Reference Gallery: Videostream — Panel 0.11.3 documentation.
Is this behavior expected?

Hi @fstroth

It’s been a while. Great to see you again.

This is a bug. I’ve contributed a fix here fix videostream unpause by MarcSkovMadsen · Pull Request #2508 · holoviz/panel (github.com)

2 Likes

Hey @Marc,

thank you a lot.

1 Like