Hello @andfanilo @asehmi
How can I use an external Video/Audio JS library like Wavesurfer.js to render and interact with my streamlit app?
Hello @andfanilo @asehmi
How can I use an external Video/Audio JS library like Wavesurfer.js to render and interact with my streamlit app?
The key part of your question is “make it interact with Streamlit”. For that you’ll need to use Streamlit components. I suggest you first look at this post which is the simplest possible static HTML component into which you can add the Wavesurfer.js
script: Code snippet: create Components without any frontend tooling (no React, Babel, Webpack, etc).
If that doesn’t work, then the React or React-less component implementation tutorials should show you more advanced schemes to make it work.
hello can you share me the github link for your project(Code snippet: create Components without any frontend tooling (no React, Babel, Webpack, etc)) and any code snippet for using the streamlit component for bi-directional communication with wavesurfer.js
@mlnewbie987 The code is not mine. Just create the files as shown in the post in those directories.
./mycomponent/index.html
./mycomponent/__init__.py
./app.py
Insert your script above the script in index.html
.
Then run: streamlit run app.py
from the root folder.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.