I have an web page where users can view videos.
But the problem is when I inspect the page, it shows the video url.
So is there any idea how we can hide video source like youtube and other videos portal ?
There is no way to hide the video URL entirely without resorting to browser plugins. You can obscure it though, but in most cases they won't be worth it.
Using Media Source Extensions you can deliver segments of video data using obscured urls. And the URL won't be immediately visible in the source of the page. This is similar to what Youtube or Netflix does but requires massive engineering work on the backend. This is also the technique used to play MEPG-DASH with e.g. dash.js or shaka-player.
Set it using Javascript, so it's not viewable with view source, it won't help with inspecting though.
If your issue is people copying the stream URL and using it in their own players, then you might look at protecting it with some sort of tokens security. This is supported by almost any CDN out there, and there are plenty of open source systems to do it in most programming languages.
Lastly, if the issue is that you don't want anyone to copy the content, you can apply DRM protection. One of the easiest and straightforward ways to get started with that, might be using Azure Media Services.
Related
It has been a long time for people trying to download videos from those sites not allowing them to do, and now they are using the HTML5 element with blob: URL created from MediaSource. Anyway whatever the source is, the video is buffered
and played in the browser so the data must be somewhere.
There are solutions like https://superuser.com/questions/1033563/how-to-download-video-with-blob-url, which is kind of useful for those sites not strictly protected, not working in the extreme case.
So here let's assume that all scripts are strictly obfuscated with network transmission encrypted, and how should we extract the data buffered to be displayed.
Solutions are not limited, except from reimplementing a browser myself.
Edit
The scenario seem like Youtube a lot, but it is impossible to trace anything through the heavily obfuscated script neither the encrypted network transmission.
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...
I am trying to create a service for a project that allows javascript-based embed codes for sharing audio clips, such that the player appears on sites where it is embedded. Very much like a soundcloud clone, but on a far smaller scale and for private sharing only.
I am not sure how to go about this, but thinking of making the javascript write the HTML5 player dynamically into any page where the embed is placed, fetching the details needed to render the player into the page via JSON-P (to overcome the same origin policy) and streaming the audio clip directly from the main server. I will prefer to use the jQuery framework.
Is this the best method to go about this? I am trying to research, but I do not know how exactly to search for the information or where to start.
P.S. I also found this helpful S/O article about how soundcloud hides the URLs of the streaming media to prevent direct downloads
How has soundcloud hidden the URL of streaming audio
making the javascript write the HTML5 player dynamically into any page where the embed is placed
You can also use iframe that will load the “widget” from your server. That's how HTML5 widget is built at SoundCloud.
fetching the details needed to render the player into the page via JSON-P
You can use CORS in order to overcome same-domain policy if you'd want to render widget with JS.
As for the streaming, the basics of it can be done via some simple server configuration and serving media files from that server (nginx is probably your best bet).
I hope this helps some.
We want to make a website that has kind of a 'photocamera' on it. The ideas is that the user can place this camera somewhere on the website and create a 'screenshot' of it and store it in a database, or send it to the website owner.
Is there any chance to realize this with JavaScript or Flash for all browsers?
Well this is not cross browser, but there is a Chrome Plugin at
Screen Capture (by Google)
You can rename the .crx to .zip. Then extract it and check out how they did the trick.
I'm afraid you have to create custom solutions for the different browsers which is hard. but it sounds not impossible!
So I have some videos in .flv format which I'd like people to be able to view from my site, without being able to download them. So far Flowplayer seems like the best choice for the actual flash player.
However, I've been looking into this video streaming thing, as its supposed to make the videos very fast to view and allows seeking to the middle of the video, etc. What do I need to make it work, do i need to have some special server software for this? And how can I integrate with this software using the javascript/PHP code that i'll use to display the videos?
Thanks.
Good news! You don't need special software, most reasonable web servers can do all of that out of the box. What you're describing, and what Youtube and the rest do, isn't streaming actually. It's called progressive download.
Basically the SWF player (flowplayer in your case) is downloading the FLV video, and playing what it has downloaded so far. To skip to some video that it has already downloaded, it seeks in the downloaded file. To skip beyond what has already been downloaded it discards the downloaded file and starts a new download, but it asks the HTTP server to start giving it the file at a certain offset. Thankfully, most HTTP servers can do this out of the box.
So you just need to put the FLV files somewhere that's publicly available to download via HTTP (just test this with your browser). Assuming you put flowplayer at /flowplayer.swf on your site, and the video is /2girls1cup.flv you would insert this into your page:
<script src="http://static.flowplayer.org/js/flowplayer-3.0.6.min.js"></script>
<!-- Edit this with the width and height to display the video -->
<a
href="/2girls1cup.flv"
style="display:block;width:425px;height:300px;"
id="player">
</a>
<!-- this script block will install Flowplayer inside previous anchor tag -->
<script language="JavaScript">
flowplayer("player", "/flowplayer.swf");
</script>
I took this example from the flowplayer demos page where there's lots more examples of lots of ways to customize flowplayer, the way it behaves and is displayed.
There are two ways in which an actual streaming server is better. One is for doing multicasts of a stream, in which all clients are at the same place in the video, which is easier on the server. The other is being able to deliver a number of different encodings of the same stream, so that, for example, clients can the video at a bitrate that best matches their playback capability.
A lot of companies bet a lot of money that this would be very important for video to take off on the web. It looks like all of them are wrong. Streaming servers are mostly used in the enterprisey world, which might explain their enterprisey prices.