Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi all

i am making a childrens web browser for my kids
and i want to add some youtube video channels to a web page using their api

the problem is i need to surpress the link back to the youtube site from the video when clicked on and the little link in the corner
as i don't want my kids to be able to access all the other content on there as
most of the comments contain language which isn't suitable

i have read that it is against their terms and conditions but since it isn't for a commercial product and just for my kids thought i could do it.

anyone know how to do this/

cheers in advance
Posted
Updated 5-May-11 8:33am
v2
Comments
musefan 5-May-11 12:16pm    
So your admitting it is a breach of their terms, yet you still want us to help you do it. You could always set up a policy that disables browsing to youtube
Ed Nutting 5-May-11 12:26pm    
+5 that. Just redirect back to last page whenever your browser's url is directed (by user) to youtube domain.
#realJSOP 5-May-11 14:36pm    
If you block youtube, he won't be able to link to the video itself either.
Ed Nutting 5-May-11 14:58pm    
That is not what I suggested. I suggested that when the browser's url is set to be youtube then he resets it to the last page. This will not block video embeds in other pages so videos from youtube could still be watched.
Sergey Alexandrovich Kryukov 5-May-11 15:17pm    
As John figured out (please see below), it cannot work.
I suggested some solution, please see.
--SA

1 solution

I think the problem is the HTML you get via embed link generated by Youtube. Is shows a button which leads to the Youtube Web page where original video is posted; and through this page your user can access the rest of Youtube contents.

You can relatively easily create a local proxy HTTP server accessible only from a machine running your specialized Web browser. This local server could redirect all the HTTP requests and deliver original content to the Web browser but filter some items. In particular, if the user presses the button I mentioned above, the local server could detect it and re-direct the request to the same page where original request was sent (which is simply a referrer page). You can create a more advances schema and devise some tiny redirection rule engine with persistent data file to make your re-directions rule-driven.

[EDIT]
The local HTTP server does not have to be a separate process. It can be even the part of the same application as your browser. It may simplify the design (not quite sure though). It all depends on how you want it.
[END EDIT]

May I give you somewhat unusual advice?
Trust your children. If you don't trust them, they will find a way to break your protection sooner or later. If you do, they might learn to trust you. Trusting you will help them much more and could eventually even save them from real troubles.

—SA
 
Share this answer
 
v3
Comments
Ed Nutting 5-May-11 15:32pm    
A top answer as usual, though please see my response to John. I believe I was in effect describing what you describe as a more complex rule engine - ie. what i described was a 'one rule' ruke engine ;P And yes, good 'unusual' adivce, I imagine quite uncommon on CP Q&A ;P
Sergey Alexandrovich Kryukov 5-May-11 15:46pm    
Thank you very much.
And yes, I agree with you after you explained how you suggest to block. One problem is: how to do it? In principle, this is not a problem, but OP probably not developing a Web browser per se but simply using available Web browser control. So, I still think the idea of a local HTTP server sitting between the original HTTP request and Internet makes sense and relatively easy to implement. At least you need not to do any advanced try-and-error experiments with any existing compoments, just work with data.
--SA
Ed Nutting 5-May-11 16:03pm    
The Web browser control allows you to get/set the url being viewed and handle events for when the page changes thus making it extremely easy to test whether a particluar website is being viewed and redirect back to last page if you don't want to let the user view that site. I would have thought that would be a far simpler solution, no? However, to do good blocking the OP would still need to implement a rule engine as you suggested and I agree it would be better to intercept requests that way you can scutinise what is displayed far better but that would be a lot of work compared to checking a domain name against a list of disallowed domain names and redirecting to last page. Web browser control even has a Back method to make that last part even easier.
Sergey Alexandrovich Kryukov 5-May-11 17:17pm    
I'm not sure or don't remember exactly how to do it with IE-based WebBrowser control, just remember there are certain difficulties. May be it's simple enough, not sure. I agree on rule engine, that's why I mentioned them. I have good experience building them, they can be enormously flexible and maintainable.
--SA
sportsonpc 5-May-11 17:32pm    
thanks for the responses guys
i am using the web controller as i am quite new to programming
just trying to find the easiest way to implement it at the moment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900