Provide `is_playing` property

Abierto
#72 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, python, react
Área
frontend

Línea de trabajo

Comienza con la página de ejemplo de Dash Player y el callback que utiliza las propiedades currentTime y playing actuales del reproductor. Rastrea cómo se expone el estado de reproducción a los callbacks y, después, verifica que la representación de estado elegida refleje los cambios del botón de reproducción y determina si muted necesita el mismo tratamiento.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
81
Forks
17
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plotly/dash-player

Todos los issues de plotly/dash-player

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.