private youtube video embeding in a website

Posted on 2014-07-30
Medium Priority
Last Modified: 2017-07-21
Hi there!

The problem is directly related to this other one EE question:


but the solution presented there is "not enough" for my purposes...

I have created a channel in YouTube and I want to upload small videos that should be seen ONLY by my customers that login in my website. They may or may not be YouTube users, they may or may not have a Google account.

I know how to upload the YouTube video, put it as unlisted and see it through my site. It works perfectly and the user cannot download the video through my website, what is also good. On the other hand, as Gary put it in the other EE post, people could get the link for the video and pass this link to friends, for instance.

To avoid the passing-link thing, I thought about changing the video type to "private" but, when I do so, the video embedded does not appear, only a message saying "this video is private"... how should I proceed?

In other words, I would like to "tell YouTube" that my site is always able to "see all videos" embedded in my website, even the private ones (especially those), and all my customers, logged-in in my website, should be able to see these videos, but they could not see the same videos in the YouTube channel, and they should not be able to let their friends see the videos (If their friends are not my students, too. The videos are webinar math exercise problems/solutions.)

Is that possible? If yes or no, how should I proceed to be able to do something like that, please?

Question by:fskilnik
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 58

Expert Comment

ID: 40230793
The info is still true

If you have a login why not just restrict the markup for the video for logged in users only i.e.
if they are logged in then you add the youtube markup (the HTML)
if they are not logged in then you don't

(and geez that is an old question)

Author Comment

ID: 40230825
Hi, Gary!

Thanks for the reply and for the link (very informative)!

I guess I did not understand what is "the markup for the video" you mentioned... let me explain my point:

If the user is logged, (only then) he/she has access to the page in which the YouTube video is embedded, and the HTML string (at this moment) at this page is the following:

<iframe width="640" height="390" src="//www.youtube-nocookie.com/embed/<%= rsRECORDSET.Fields.Item("MediaObject")%>?rel=0" frameborder="0" allowfullscreen></iframe>

In other words, the system tries to hide the name of the link for the YouTube video, and that´s good, but the user could see it at the source code of the page...

But the main problem is that I would like to put the video at YouTube as private, so that if no gmail accounts are authorized, even with the proper link the potencial viewer would not succeed...

The problem, as I mentioned, is that when I change for "private", my own website cannot see the embedded video... got it?

Author Comment

ID: 40230838
Hi again, Gary.

I found a (potential) marvellous solution with two letters: Google Drive.

This was found in this EE post (Scott suggestion): http://www.experts-exchange.com/Web_Development/Social_Networking/Q_28316468.html

I will try to implement it tomorrow (now 22h52min here) and will be back to give you my feedback.

If you have another idea or comments on this idea, please do leave it here till I´m back!

Thanks a lot,
Tutorial: Introduction to Managing a Linux Server

In this tutorial on systemd, we will explore:
-OS/Distro Adoption
-chkconfig and Other Legacy Commands
-Summary and Key Commands


Author Comment

ID: 40230851
Hi, Gary. I could not implement the Google Drive idea... the problem is of the same type... I cannot see the video at my webpage, because in a certain way my Google account does not relates to my website, so to speak...

Please help!  

(I guess through YouTube would be better, if possible, by the way...)

Author Comment

ID: 40230857
Now I must really go home... found this (below), will look tomorrow...

LVL 58

Accepted Solution

Gary earned 2000 total points
ID: 40230903
OK so your video is only accessible by logged in users.

As in the previous question you can make it private and invite viewers which won't work for you as it limited to 50 invites

Make it unlisted which means you can control who sees it on your website (and not listed anywhere else and as it's only visible to logged in users you don't need to worry about Google et al indexing it) but any logged in user can get the url to the video.

It's 6 of one and half a dozen the other. You have to weigh up the fact that are your logged in users going to redistribute it - this is not a problem specific to your scenario, trying to protect content on the internet is near impossible
The best you can do is add a copyright to the video and regularly check if it is being distributed anywhere else and file a Cease and Desist order against the website.

I have been in a similar situation where some software I had written was being resold on some Indian website - the only way I managed to get it removed was to get a solicitor to write to all their upstream providers.

It is really difficult to protect intellectual property on the web. You only have to look at Amazon where people reupload eBooks as their own property and can make a lot of money before Amazon remove them
LVL 58

Assisted Solution

Gary earned 2000 total points
ID: 40230919
Depending on your download stats you might be better looking at Amazon S3 storage
It's not too expensive, obviously more than YouTube, but at least you can control access.
Still it won't stop someone saving the file locally and reuploading...

Author Comment

ID: 40231529
Hi, Gary.

Thank you for your absolutely complete answer (this seems to be your trademark, right)?!

I guess I have to deal with unlisted videos and potential students of mine sharing through reuploadings... to be sincere, this could also be a positive (I hope!) marketing, because the videos are just part of my course, and the exercises and mocks are not able to be accessed without proper login/password/orderID/etc credentials...   :)

Before considering this post closed (and your answers rewarded), could you please have a quick look at the link I posted (https://katz.co/embed-protected-video/) and tell me if you think I should invest some time trying to follow that recipe?  (In other words, do you believe it could really protect my videos as if they were private, without the possibility of my students sharing the link or being able to reupload?)

Thanks a lot for your time and expertise in all that!
LVL 58

Expert Comment

ID: 40231685
Reading the comments it seems like that is a premium service now.
Regardless anyone with a bit of know how would be still able to download the video

Author Closing Comment

ID: 40231871
Perfect, Garry.

Thanks a lot, really.

Best wishes in all your projects and see you in other EE posts!

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question