Skip to content

Provide is_playing property #72

@scholich

Description

@scholich

Currently there is no obvious way to determine within a callback, if the video is currently playing or not.

The existing playing property is not synchronized with the actual playback of the video as can be seen on the example page https://dash.plotly.com/dash-player
Specificall, the video can be started and stopped when clicking the checkbox but when starting the video playback with the video, the property is not changed.

This is not due to the specific example as a modficiation with printing the current state of the playing variable e.g.

@app.callback(
    Output("current-time-div", "children"),
    Input("player", "currentTime"),
    State("player", "playing"),
)
def display_currentTime(currentTime, playing):
    print(playing)
    return f"Current Time: {currentTime}"

shows: The value of playing can be False while the video is in fact playing by clicking on the play button within the video.

It would be great to either have the playing property synchronized with the actual video playback or provide a new isPlaying property that reflects the actual video playing state.
The same is true for the muted property (and possibly others).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions