'pyqt5 open a special link and play audio

I'm making a dictionary app with pyqt5. I have to solve a major issue to play audio from anchor like:

<a href="sound://hello__us_1_rr.mp3"><audio-us><pron-g><xhtml_a href="help:phonetics"><phon-blk>/<phon>həˈloʊ</phon>/</phon-blk><audio eid="hello_audio_2" name="hello__us_1_rr"></audio></xhtml_a></pron-g></audio-us></a>

I have set the html in WebEngineView, the page looks as below: hello.png

The question is how could I redirect to a func to play an audio when I click on the link?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source