Unfortunately this is a really hard problem. Facebook, Twitter, Vimeo, and YouTube all use different livestreaming systems, and all try (in various ways) to prevent you from interacting with it programmatically. Most of them also rely on a full web browser to run a stream – e.g. you can’t contact a url directly and get the stream without loading facebook.com in the browser and logging in. If they find out there is a way around that, they stop it – that’s how they keep people viewing their advertising.
I am not an expert, and things are changing rapidly. If you were able to run Processing p5.js code in a web browser, you might be able to interact with a live html5 video object – but I wouldn’t bet on it. This is a hard problem – I would definitely not recommend it for a new programmer. Instead, you might focus on one re-streaming technology for one platform (e.g. youtube) and have your sketch interface with just that. Still hard, but less hard.