Depending on your OS, there are methods to create a fake microphone or webcam linking to an audio or video file/stream. GStreamer, ffmpeg, libav, are all in the linux world. For windows and osx there are even easier ones.
In chrome/firefox you would then just choose to share the fake stream instead of your regular microphone/webcam.
Explaining all the steps to install these is outside of the scope of the forum, but it is possible.