N
N
nckma2015-11-27 21:51:45
Browsers
nckma, 2015-11-27 21:51:45

Is there a way to change the video source on any browser pages?

I need to make such an extension for the browser (actually for all browsers, but at least for one, for example IE), so that it replaces the video source on the page - if the page has a video player. Is it even possible?
For example, you go to youtube - and no matter what video you choose to play - it always plays the same one, set by me. But you need not only youtube, but also any other pages.
Wrote a BHO extension for IE - it catches the OnDocumentComplete() event. Theoretically, I can now change something in the DOM of the page. I can find the tag and somehow modify it with src="". However, firstly, the video tag may not be explicitly present. There are all sorts of html players that I don’t understand how they work at all.
Secondly, the page can be generated dynamically from a script. New html elements may appear or be removed and src may change.
What are the chances that the plan can be done at all?
Let me explain what is needed.
If the user enters the terminal server and starts playing the video from the browser, then this greatly slows down the server. If several users are watching a video, it's generally a problem, since one player can take 15% -20% of the CPU.
If you manage to slip a fake video instead of the requested one, then this can greatly save CPU time on the server. A fake video can be pre-created with a light weight, for example 5 frames per second, all frames filled with the same color. Such a video is easy to decompress and send to the client. But the client can also get the address of the real video from the server and play it locally.
Thought about modifying browser requests with a proxy - but that might only work for http. What to do with https?
Something like that..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kir117, 2015-12-03
@kir117

The question, of course, is interesting, but why is it so difficult? Offhand, I see three different solutions to this problem:
1) We look towards the Windows System Resource Manager https://technet.microsoft.com/en-us/library/cc7707... and limit the consumption of resources by the user or application.
2) Kill the flash player on the server.
3) We restrict access to any video services on a proxy for the bulk of users.
Actually, the 3rd option, as far as I know, is the most common.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question