You could try it with text filter plugin type. But it's just guessing without knowing more about the background of your needs (such as how those media are added to the course, where the text version is loaded from etc).
General developer forum
Create a new discussion summary/search plugin
This discussion has been locked so you can no longer reply to it.