Use of <bgsound> tag in HTML - html

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

Related

Can we have an HTML audio player (<audio>) with same appearance/styling in all browsers?

Currently, I've observed that the audio player added via HTML tag looks different in appearance in Chrome and Firefox.
Is there any standard we can follow to make its appearance same across browsers or implement custom player in an easy way to achieve the purpose?
Yes, we can have customised audio player which can look same across all the browsers. But the thing is we need to do styling and develope functionality of that audio player like
a play/pause button
a seek slider
the current time indicator
the duration of the sound file
a way to mute the audio
a volume control slider.
May be the following article will help you
https://css-tricks.com/lets-create-a-custom-audio-player/
Yea You can have it.
You Just Need to write the Appearance .css for all platform Respectively And Explicitly

Hide Properly Download Button

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.

JWplayer with <video> tag for SEO

Is there a good way of using JWplayer to instantiate a video tag in stead of a plain div?
Here's a support thread (https://support.jwplayer.com/customer/portal/questions/6062676-jw-player-not-working-with-video-tag), but basically JW admin comes back and tells the OP to not use a video tag at all.
This is the example markup from JW:
<div id="myDiv">This text will be replaced with a player.</div>
<script>
jwplayer("myDiv").setup({
"file": "http://example.com/myVideo.mp4",
"image": "http://example.com/myImage.png",
"height": 360,
"width": 640
});
</script>
SEO wise, this is utterly useless, the video won't get crawled if it's only instantiated into a plain div by JavaScript after page load.
What I want to do is to have a proper video tag on the page and then instantiate a JW player instance from it. This way the video tag is visible to crawlers without it having to execute JS (which not all do)
The JW Team removed the "support" for embedding over the <video> tag in the upgrade from JW5 to JW6, primarily because they were experiencing too many support issues with embeds failing as a result of conflicts between the initial <video> tag loading and what their code was trying to do.
I wrote an article in 2012 which explains the problem they were faced with: http://powered-by-haiku.co.uk/?p=1
Rather than fix it, they decided to go with the current embed into <div> solution.
Now, you can still technically embed over a <video> tag with JW6 and JW7 - you just need to ensure the "preload" attribute is set to "none" in the original tag, and that this video is also not set to autostart.
However, in terms of SEO using the current JW approach, there is still a way to allow search engines to index and show your videos in search - actually the biggest issue with the move away from embedding over native <video> tags is to do with accessibility - not SEO.
Check out https://developers.google.com/webmasters/videosearch/schema#adding-videoobject-to-a-video-page for details of how to add schema.org markup to your page to support video tagging.
Ideally, in time, JW will allow a built-in means to progressively enhance this Schema.org metadata and build a JW config object dynamically (like they used to do with the video tag) - as it stands however, you'd either need to do that yourself or duplicate the associated information.
Either way, the accessibility issue still exists!

EPUB3 audio button too big

I'm building an EPUB3 ibook and want to incorporate audio.
I'm succeeding, in so far as that I have a screen on my iPad2 with a button to play the audio file.
But that button is ugly and way too big. I suppose it's some default button of Apple.
How can I influence the way the button looks?
The XHTML tag I use now is like this:
<audio controls="controls" src="dir1/sound.wav">sound.wav not present</audio>
That's all I do now. Nothing epub:type for this whatsoever.
Good question. Apple has royally failed on the audio player in this last iOS update... But the good thing is: you can build your own using Javascript!
You can find most of the main functions here: http://www.w3schools.com/tags/ref_av_dom.asp.
As long as the audio container is in the same chapter, you should be able to control it with the functions above (just hide it and don't show controls). Then you can use custom CSS to build your player from scratch (cool example here: http://webdesign.tutsplus.com/tutorials/create-a-customized-html5-audio-player--webdesign-7081)!
You should also use .mp3 format for best file sizes and results...
Good luck!

Is it possible to loop a list of videos?

The title pretty much says it all. I have a spot on a webpage that currently plays a video. I'd like to update the page such that I can add a line of code with a reference to a couple files located in a folder with the source, and the page will play the first video, then the second, etc. until it reaches the final video, and then play the first video again, looping indefinitely. It's extremely preferable that this line of code would be able to play video files, .swf files, pictures (for a pre-determined length of time), etc.
Currently, I'm just using a very rudimentary
<video width="100%" height="100%">
<embed loop="true" showcontrols="0" align="left" src="New Site Folder\DemoVid_sound_mods.avi"/>
</video>
The problem with this, though, is that it only plays one video, and if I want to add more parts to it, I have to edit the video itself, rather than just popping a new file in the folder.
I saw another question answered that mentioned doing this with javascript, but the whole point of this project is to make it exceptionally easy and quick to update. The main thing I'm looking for here is for us to be able to update the page by opening a file in notepad, adding a line of code, saving, and running it.
Any thoughts? Even just a pointer on what commands might be useful here would be helpful. Thanks in advance!
As far as I know you won't be able to do this with the inbuilt html5 video players native to the browser, It's just not the principle on which they are built.
What you are looking for is more of a media playlist style set of features.
You will have to use one of the javascript based html5 video players to get some of these features but even then I'm not sure of the support for swf and image files I've seen a few which do various videos and audio files but nothing HTML5 which also does swfs also as again, the premise of these players is usually to eradicate flash.
My best suggestion for doing all of these in one single embed is to use flash via the longtail/jw player or flowplayer which handles playlists etc or perhaps slideshowpro which I know does both images, video and I think audio too.
Finally.. harking back a decade or so. theres a Language which is pretty underused and suffers varied support called SMIL which supports all of these elements you mentioned however it's uptake sort of fell apart with the introduction of video in flash. I remember that Realplayer and Quicktime could serve SMIL files but I'd be pretty cautious to do anything in SMIL these days.
Hope that helps.
A

Categories