Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Question: Audio player widget #210

Closed
ThetomekK opened this issue Jan 12, 2019 · 8 comments
Closed

General Question: Audio player widget #210

ThetomekK opened this issue Jan 12, 2019 · 8 comments

Comments

@ThetomekK
Copy link

Hi there,

Do you think, it is possible to implement a kind of audio player widget for panel?

I'm looking for a possibility to show the audio raw data and/or the spectrogram (2D numpy array) and play the underlying audio.

Thanks for your opinions.

@philippjfr
Copy link
Member

I don't see why not, I'd happily accept a PR adding one. Should be easy to add a model which renders an audio HTML tag and populates it with base64 encoded data or a URL pointing to a remote audio file. If you feel up to working on this I'm happy to provide pointers, something like FileInput model would be a reasonable starting point.

@philippjfr
Copy link
Member

If we're adding an AudioWidget we might as well add a VideoWidget too.

@jbednar
Copy link
Member

jbednar commented Jan 12, 2019

I already demonstrated video working via YouTube, which was trivial, but I can't remember what I did with that example. I think it was based on something like https://stackoverflow.com/questions/27315161/displaying-a-youtube-clip-in-python .

@philippjfr
Copy link
Member

That's not really what I was talking about, I was imagining a dedicated widget which you could point to a local or remote mp4/webm/... file. You could probably already to this using a Div but a dedicated widget seems sensible so you can more easily embed it and so a user does not need to know too much about HTML.

@jbednar
Copy link
Member

jbednar commented Jan 12, 2019

Sure. For audio there's not really an obvious YouTube equivalent, but it would be nice to have examples of both types (local media player, and embedding remote content like YouTube).

@philippjfr
Copy link
Member

Sure, a simple wrapper around YouTube videos makes sense too and wouldn't need a custom bokeh model either.

@ea42gh
Copy link
Contributor

ea42gh commented Jan 13, 2019

Documentation: show an "intro to holoviews talk", e.g., from one of the conferences you presented at :-)

@philippjfr
Copy link
Member

@ThetomekK Could you try out #215 where I've implemented the Audio model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants