if we can enable the audio option in getDisplayMedia. when we share screen, we can also share youtube video with audio
There is a builtin way to share a YouTube video already, check the … menu
As for sharing getDisplayMedia with audio, IIRC that won’t work well for all kinds of windows, like other apps for example. Not on all platforms, that is.