I have an audio playing site and I want to prevent the users from downloading the sounds
from the HTML audio element download button. So I wrote:
<audio src="sound.mp3" controls controlsList="nodownload"></audio>
It works fine but I can delete the controlsList="nodownload" from inspect element and then
the download-button appears.
Any ideas of how to deal with it?
You cannot stop a user from downloading a file if you give him access to. When the user is reading the audio file on his computer, the computer is actually downloading the file in his RAM while playing it. Nothing can prevent the user from simply storing this data in his hard-drive.
The only way to stop the user from being able to download the file is by not letting him play it.
You can use DRM-wrapped content on the web. Here is a list of the web browsers supporting DRM content.
Everything you hear or you see on your browser is downloaded from different sources. How browser can write some text or play music if its protected by server/by you? Even if browser protect all these things from you for example if theres no way to download Rihannas new song from SoundCloud, you can allways record it. Sorry, but you can do nothing about that.
Related
I have a simple question and I don't have a clue that how to achieve that.
When I click a video link even I add a download attribute, Chrome always show video instead of downloading it.
How can I force it to download video or other file types that display on Chrome by default?
Thanks.
Update
In Chrome, you can use Alt+Click to force downloading.
But anyway, I need a way that provide simply click to trigger download instead of playing it and if that way work on every browser that will be the best.
I am trying to upload an MP4 file. But with this specefic file only the sound content is displayed.
With all my other videos there is no problem only with this specefic one.
i found the following SO question:
HTML5 video of type video/mp4 playing audio only
Where he suggest to find a converter.
Does anyone know if this could be the problem and how do i secure that regardless of what video my user uploads that it will always be able to play?
Yes, this can be a problem.
You have not written about your server limitations, so if you have the possibility to execute converters (like ffmpeg) then this is the best solution. This way you can also guarantee fixed resolution, framerate and various other properties, and your server won't eat up all the space if someone uploads a 2GB video... (Users can be dumb sometimes.)
If you cannot run ffmpeg on the server then try reading some about how can you detect codecs on your server, in the language you use, etc. Then, if you still want to, post a specific question.
Also try opening your videoplayer page with different browsers (Chrome, FF, IE at least). They might not support the codecs the same way.
So I was recently trying to learn html5 stuff and got to the audio tag. It seems to work just fine on my PC's browser, Chrome, but not so much on my android (4.0, using both the stock browser and dolphin). It will play the audio once, but never again. Take this site for example:
http://www.stefanvignir.de/rimshot/
Very basic, it has a button that plays audio every time you press it, but not on my android. It only plays the first time you press it. How do you get around this? Just wait for mobile browsers to update?
I heard a workaround is to set audio.currentTime = 0; but that didn't seem to solve anything.
Apparently you can reset the source (audio.src = audio.src) and that will allow you to play it more than once, but it has to re-download the file. A workaround, I guess, but not acceptable.
Any suggestions? Thanks.
this works in desktop and andriod browsers for multiple presses - and you can wrap in a div etc for styling:
<a onclick="this.firstChild.play()"><audio src="1.mp3"></audio>play</a>
More than just the audio tag so you have more control over what the play button looks like. If you need more buttons you can change the code for pause etc
I'm using jQuery to dynamically write <video> objects, and running videojs to init them. After I play a video, SOMETIMES when I try to play it again, it just won't play, and from that point on, even after refreshing the page, no videos will play. Each time, the <video> object renders, but the video just doesn't play. Nothing is written to the console. There don't appear to be any errors. Restarting Chrome resolves the issue, but only momentarily. After playing a few videos, the issue comes back again.
I found that closing other tabs in Chrome does indeed fix the problem, so it appears to be some kind of memory issue.
I'm running Chrome 19.0.1084.46
Exactly how many video tags to you have? What do they look like? Do they include preload='none' attribute? Are the source videos all on the server?
I ask because if you have more than six video tags on a single page pointing to the same source server then you could be experiencing "connection starvation":
Chrome allows only six open connections to a single server (based on DNS name in the URL)
the html5 video tag's preload attribute default value is 'auto'
Chrome's auto behavior is to preload some data and leave the connection open ready to pull more data for the video
So, with more than six video tags on a single page pointing to a single server, the videos will not play. To resolve this particular problem, set the preload attribute to 'none'
Stu is correct. But sometimes, in my experience, Chrome ignores the preload="none" attribute and goes ahead and opens a connection anyway. I've had much problem with this when developing a site which had many smaller videos on it. The connections blocked the rest of the content (images, custom fonts (and when custom fonts are delayed, the text does not even render)) My solution was to build an own preloader which loads the images. This made sure I could control at least when the images (which was the most crucial aspect from a design point of view) was loaded.
That solved the problem with images not showing but the problem still remained. So the best solution is to set up subdomains pointing to the same server, like: v1.server.com, v2.server.com, and so on. This means you won't have to move your files and you get the benefit from enabling browsers to have more open connections. Watch out for increased dns lookup time though.
There is a known bug with Chrome. It will not play the same video in multiple tabs at the same time. This is probably what you are running into if you are a developer and happen to have your page open in two tabs at the same time.
The bug has been known for almost 5 years as of this writing. Feel free to visit the Chromium bug report and star the issue. Hopefully it will increase in priority for the Chrome devs.
In the meanwhile, a workaround is to use a random query parameter in your video src. For example, instead of <video src="vid.mp4">, use <video src="vid.mp4?_u=1253412">. This will break Chrome's caching mechanism and allow the same video to be streamed to two different tabs at the same time.
I had a similar but related issue which I can expand on slightly here.
I had 14 different small videos on a page but only 2 were available at a time. Setting preload = 'none' didn't fix the issue so I also used a data attribute to store the src, and remove the src for all videos that aren't currently being viewed.
What is the use of the <bgsound> tag in HTML?
It is a non-standard tag which instructs the browser to load and play a sound file (famously, at least in the mid-90's, a MIDI file) while the user is browsing your site.
Except in a few very special cases, the real purpose is to time how fast the user can find his browser's "close" or "back" button. Seriously, don't use it, on almost every site sound is unwelcome.
If you do decide to use it, you'll want to consider marquee and blink as well. Also an animated-GIF construction worker "under construction" sign and purple text on a dark green background.
If you want to give the user an option of playing music on your site (e.g., because its a music site), I suggest that a flash widget is your best bet. Depending on the site, it may or may not be appropriate to auto-play the music. Alternatively, you could use the new HTML5 audio element (though support is lacking).
update: As pointed out by Adam Brown, HTML5 audio is now supported almost everywhere and should be used instead of Flash.
tells the browser to play a particular sound when the page is loaded.
link:
http://www.htmlcodetutorial.com/sounds/sounds_famsupp_18.html
The other answers are all wrong. This tag is used to get the user to close the page instantly.
A "background sound" is a sound that starts to play automatically when the web page is loaded.
This attribute is used to define what the source of the sound is. Insert the file name and file path if necessary here.
http://www.abiglime.com/webmaster/reference/html/tags/bgsound.htm