Closed Network Web Server - Prevent Video Download - html

I'm working on a project about a streaming server (Linux, Apache, Squid, DHCP) that works on LAN. Clients connect to the server through web browser and watch videos with HTML5. Using HTML5 is very simple, but clients can also download videos easily with right-click menu (or with a browser extension). Is it possible to prevent users from downloading videos with squid proxy server while they can play videos with browser? I tried to block video file downloading (with squid), but with this method HTML5 video won't play either. Squid config for blocking file download that i used:
acl BlockExt url_regex -i \.mp4$
http_access deny BlockExt all
Thanks.

sadly there is no way to differentiate from the server between a browser requesting the video to play and requesting the video to download.
you could add an annoyance factor by disabling rightclick via javascript (that's only going to stop really basic users) or split the video into multiple fragments and use the ended event to jump to the next piece (potential for buffering delays of course, but for this sample dealing with Audio it's been fairly reliable - https://gist.github.com/1266499)

Related

How how do I link live Shoutcast broadcast to website?

I am new to coding and am trying to set up a streaming audio option so that visitors may listen to a weekly live broadcast directly from a website but most browsers are blocking it from running.
The live stream is coming from Shoutcast as an HTTP:// not an HTTPS:// which is causing an insecure mixed content issue.
The stream works fine on Firefox on the live site, but will not work on any other browser tested.
I do get the console message on Chrome that it was automatically upgraded to HTTPS://, and from what I understand I should just have to change my code to HTTPS:// for it to work, but it is not, and I could be wrong.
Here is my original code:
<audio
controls
src="http://djefo.lightmanstreams.com:8020/;"
type="audio/mpeg"
></audio>
Are there any suggestions on how I can make the stream work on Chrome at least?
Well, unless you upgrade your shoutcast streaming package, you will not be able to use https to avoid mixed content issue. From my experience of shoucast/icecast streaming, I can say you have to upgrade your package to the certain package which provides SSL for your streaming URL.
Two options:
Latest Shoutcast version (2.6.1 build 777: https://yp.shoutcast.com/v/2_6_1) does support SSL out of the box on Linux, so you can get a free SSL certificate from Letsencrypt and use it with Shoutcast.
You can configure Apache or Nginx as SSL proxy for your non-ssl SHoutcast stream, see this answer: Web radio stream proxying

Playing video from remote server using HTML

suppose I have an mp4 sitting on a remote server that I can SSH into. can this file be streamed using the video tag? what would the URL look like?
Very theoretically:
ssh://example.com/path/to/some.mp4
… but browsers don't implement SSH clients or support for the SSH protocol, so that won't work in practice (although it might be possible to write a browser extension to add support).
If you want to embed the video in a webpage, then make the MP4 available of HTTPS (or HTTP).

getUserMedia() without SSL for local storage

In my website I need to record audio from the microphone and then replay it.
I do not need to send those files to the server, they can remain on the client.
Currently I'm successfully using flash for that, but I would like to switch to html5 and getUserMedia().
I'm aware that I normally need SSL for using getUserMedia() (except from localhost use), but I'm wondering if there is some sort of exemption if I don't want the data to be uploaded (and thus there should be no security issues in using it).
There's no exemption. Having one would require running your script in some sort of local sandbox with separate local storage and no networking. Does not exist.
Only Google Chrome enforces this https requirement by the way. Other browsers do not.
Getting a free certificate is easy.

Streaming videos for my website

I am going to host some videos in wowza server because I need security and streaming. I went through the tutorials and notes, and in order to out the videos in wowza, the server should be installed in my machine. OK, now the problem begins.
How can I install the wowza in the web host? Or is there is any other way of doing it? Once the videos are uploaded to the internet, how can they use wowza?
The server is not installed in "your" machine (I mean, not your local desktop). You can only install wowza to the web server if you have a dedicated server, and you have full administrative rights to it, and you can log on to it via remote desktop (RDP or VNC). It will be costing you anywhere above $80 per month.
Your question "Once the videos are uploaded to the internet, how can they use wowza?" doesnt make sense unfortunately. Why you upload it to the internet ? You upload the videos to the storage directory of the Wowza server you install in your dedicated server, via any means you prefer (Like FTP or copy-paste etc).
Once you place the video files the the content directory of wowza, you will be able to use the streaming links (you can get it from wowza) to steam videos elsewhere with the URL.

Bandwidth in html 5 audio player

I am using a html 5 audio player on a web site to play an mp3 file.
The mp3 file is not located on my server, but on another site.
Will playing this mp3 file at all involve traffic through my server, or will the traffic go directly from the mp3 file server to the web browser on the users pc?
I can see from the Azure admin console that now traffic is directed through my web server when playing audio in html 5, when the audio is located on a separate server.