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

Add tooltip support for image/audio data #9

Closed
phurwicz opened this issue Dec 20, 2020 · 2 comments
Closed

Add tooltip support for image/audio data #9

phurwicz opened this issue Dec 20, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@phurwicz
Copy link
Owner

phurwicz commented Dec 20, 2020

Requested by /u/svldsmnn on reddit, e.g. audio playback on mouse hovers or clicks (TapTool can be a good idea if the crosshair hits multiple points and can't decide which one to pick up).

For running audio playbacks, This gist can be helpful despite coming from a time of bokeh 0.12.


Also there should be image display in the tooltip, should something like an "image" field be present.

@phurwicz phurwicz self-assigned this Dec 20, 2020
@phurwicz phurwicz added the enhancement New feature or request label Dec 20, 2020
@phurwicz phurwicz changed the title Add support for audio data Add tooltip interaction support for audio data Dec 20, 2020
@phurwicz phurwicz changed the title Add tooltip interaction support for audio data Add hover/tap tool interaction support for audio data Dec 24, 2020
@phurwicz phurwicz changed the title Add hover/tap tool interaction support for audio data Add hover/tap tool interaction support for image/audio data Dec 24, 2020
@phurwicz
Copy link
Owner Author

phurwicz commented Dec 26, 2020

015b9de added a simple autoplay audio div, and checked that the existing image div is functional.

Because images/audios are files rather than simple strings, one would need to put http://<url-to-image.png> or http://<url-to-audio.mp3> in an image or audio field of the dataframe, respectively. file:///<path-to-file> could work in principle, but modern browsers block this for security concerns.

However, right now there are no high-level APIs (like hover.recipes) that make image/audio tooltips easy to use. Manually creating BokehXXXExplorer and passing tooltips=bokeh_hover_tooltip(...) can be too steep of a learning curve, not to mention having to account for everything else under the hood in recipes, such as link_selection or subscribe_update_push.

Leaving this issue open until the feature becomes more accessible.

More resources that could be useful later on:

@phurwicz phurwicz changed the title Add hover/tap tool interaction support for image/audio data Add tooltip support for image/audio data Feb 20, 2022
@phurwicz phurwicz added next release Will be included in the next release. and removed next release Will be included in the next release. labels Feb 21, 2022
@phurwicz
Copy link
Owner Author

Implemented and released in 0.7.0.

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

No branches or pull requests

1 participant