custom function in pywebio
I would like to add an mp3 player in UI, kindly suggest to me how to start or which function (in PYWEBIO) support the mentioned task?
Isnt a built-in.
Maybe write or use a javascript library that adds mp3 player ui support. Then inject the javascript in the config similar to https://pywebio.readthedocs.io/en/latest/cookbook.html?highlight=javascript#add-google-adsense-analytics-code
Also i think mp3 is patent-free and not is supported in the HTML5 <audio> tag so possibility you can research on using PyWebIO put_html function.
Good luck
@SavSanta HTML5 audio does support mp3, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
@mlakshmi22 There is a put_audio() added to pywebio battery, see https://pywebio.readthedocs.io/en/latest/battery.html#pywebio_battery.put_audio
@wang0618 Yes sir. When iwrote that last year i made a typo. The 'is not' shouldve been 'is now'. As it is payent-free.
Either way good to see that a new function existsfor folks in the future other than injecting javascripting or using put_html with audio tags.
Nice work!