Provide `is_playing` property

Offen
#72 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, python, react
Bereich
frontend

Rechercherichtung

Beginne mit der Dash Player-Beispielseite und dem Callback, der die aktuellenTime- und playing-Eigenschaften des Players verwendet. Verfolge, wie der Wiedergabestatus für Callbacks verfügbar gemacht wird, und überprüfe anschließend, ob die gewählte Zustandsdarstellung Änderungen durch den Play-Button widerspiegelt, und ermittle, ob muted dieselbe Behandlung benötigt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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).

Vorherrschende Sprache
Python
Sterne
81
Forks
17
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/dash-player

Alle Issues in plotly/dash-player

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.