Encrypting Src of Iframe - javascript

I own a website. There are some movies on the website, which are made by myself. I want to make money from the website by creating paid movies. That means the website visitor need to pay to watch the full movie or to download the movie.
In the website, the movies are played in an Iframe now. My idea is to upload the paid movies into a directory. The directory's name is as complex as a password. Then I will hide the name of the directory so the website visitors cannot download or watch the paid movies without going into my Iframe.
I have already used javascript to prevent right click "Open in new tab" and "Open in new window". I want to know how can I encrypt the Src of the Iframe so that the website visitors will not know anything just by watching the source code.
Please use PHP or CSS or HTML of JAVASCRIPT to solve this problem. Thank you.

Everyone will be able to look up the videos real url using the network inspector / console. The only way to really protect your videos from being watched from unauthorised people would be setting up an appropriate pay wall / authentication scheme.

Encrypted Media is the standard you're looking for.
It will not do what you asked, but is the solution for you.

Related

'Some cookies are misusing the recommended “sameSite“ attribute' On OneDrive embedded video

I have embedded a video from onedrive on my website. When I open the site I get an error that goes something like:
Some cookies are misusing the recommended “sameSite“ attribute (10)
The video does not play but after ~5 seconds it opens the onedrive website. Not sure why.
I have tried using google drive but instead of the video I get this
Can someone help me with this.
If I need to provide more info then ask.

How can I use Python to download a video from a website?

There's a really cool course on Kadenze on machine learning.
Much like coursera-dl does, I would like to download all of the course videos so I can reference them later.
For simplicity's sake, let's assume I've logged in and have access to the page with the videos on it.
How can I download the video(s) on the page with Python?
Extra info (will be edited as more information is found):
There doesn't seem to be a specific URL for each video that I can
access. (Pressing "Copy this link" on the buttons that go to the next
videos results in javascript:void(0); on the clipboard.
2019 Update
I know very late to this game, but youtube-dl seems ideal for this purpose.
The name is a misnomer they cover many more video hosting sites (other than youtube), and works very well.

Protect youtube link

I am using video-js in combination with its youtube plugin on my website. Video content on this website is premium and only first X users should be able to view it. Right now its being realised by passing a YouTube link that is unlisted (cant be searched on YouTube and can be accessed via direct link only) into my website and afterwards first X users with specific link to my website can view it.
Logic behind this process lies in fact that these videos can be accessed only through my website so I need to protect YouTube URL from being copied from the JS and HTML.
So I want to ask if there is some way how to dynamicaly obfuscate, encrypt etc. these values/variables that hold URLs so the common user could not steal it?
I say common user because it is clear that the video content is being downloaded into client side so there is no ultimate way on how to protect it from stealing and advanced users can definetly do it but what I mainly want to accomplish is to disable access to the unlisted YouTube URL in the source so the video can be only seen through my website.
P.S. What I know to this point right now - Vimeo provides solution called domain level privacy that provides ability to play videos only on the specific domain what could possibly solve my problem, however my target group are YouTubers so this is not the way I want to go...

Pulling String from Pandora and sending it to Youtube in JavaScript

My project is when Pandora is open and playing, be able to punch a button (either on the page or as an add-on in Firefox. This button would then activate a script that would pull the song and artist name from the page and store them in variables. Then these strings would be put through a Youtube search. The URL of the first video will then be stored in another variable. A website that strips the mp3 from the video will be opened and the Youtube URL will be deposited in the appropriate field. Ideally the converted file will then be downloaded.
I don't know much Javascript but the point of this project is to help me learn. I haven't gotten very far at all and need some help. I know the divs where the song string is on the page but can't seem to store it. I'm using GreaseMonkey to run the script.
One suggestion was to use Java and make it a desktop application and have it listen to system volume and send it to a Shazam-like website and go from there but there are no non-mobile Shazam apps that would apply to this.
What I need help with:
Is JS the right language to use for this task?
If so:
How do I store the song info into variables. I've researched it and anything I put into the script involving a variable causes it to not run.
Thanks in advance.

How to route visitors from China to Youku and others to Youtube?

Is there a standard way of routing IP addresses from certain ranges to a certain link and another range to another link?
I have a large percent of visitors coming from China, but I don't want to make that reason enough to route all traffic to Youku. Oppositely, I don't want to have a broken page element for people in China.
Currently there is a screenshot button that loads up a Javascript popup. Inside the popup is the video that is meant to load. I could run a script to detect the IP address and server the respective link, if there was a way to detect this.
Im wondering if others have solved this issue already, and if so, what method they used.
Thanks!
ps: For those who dont know, Youtube is blocked in China and Youku is one of China's equivalent video streaming sites.
There may be better ways than this, but an possibility would be to let the client load Youtube (or Youku) in an iFrame and then read the contents of it, if you can't get the page or you can catch some error, then you should get Youku.
That does also mean that when Youtube is down for maintenance for example your script would break.
IP routing may be better, but as far as I know there is not a perfect script for it.
You may want to check this: How do you detect a website visitors country

Categories

Resources