Categories: Discuss Chrome :

How do I make chrome play an embedded midi file?

Showing 1-18 of 18 messages
How do I make chrome play an embedded midi file? Chisq 12/14/08 5:16 PM
When I use Chrome to open a page with an embedded midi background file, like the following:

<bgsound src="http://...../fb.mid" loop="0">

the song doesn't play. The same page works fine if I open it with MSE. What do I need to do to make Chrome play the midi file?
Re: How do I make chrome play an embedded midi file? SusanTheCat 12/18/08 12:45 PM
bgsound is a proprietary Microsoft Explorer tag.

I can't get midi to work using an embed tag.

Susan
Re: How do I make chrome play an embedded midi file? maximouse 4/17/09 1:01 PM
Yep, that explains it . . . now, will someone post the tag that WILL work best in Chrome to play a background sound when a page loads?
Re: How do I make chrome play an embedded midi file? breandan 4/27/09 3:38 PM
I'm having this problem as well. BGSOUND tags do not work whatsoever. In fact, midi does not work at all.
Re: How do I make chrome play an embedded midi file? cat-cat 6/17/09 1:35 PM
I miss the ability to listen to midi files embedded in Web pages.  I think I'll just go back to using IE.  Sorry, Google Chrome, you are just not "with it" on this one.
Re: How do I make chrome play an embedded midi file? Nataraj418 7/15/09 5:43 PM
I agree with cat-cat. I may use Chrome for simple tasks, but if I want bgsound, I'll have to fire up Internet Explorer (as much as I don't really want to). Note that Firefox has the same problem. I've tried every solution they offer, and the only one that works is one that directs you to another program that plays the sound (after a long delay). Chrome has no suggestions at all - just no bgsound !
Re: How do I make chrome play an embedded midi file? RoDuHo 7/17/09 3:19 PM
Firefox uses the EMBED tag instead of BGSOUND. I've tried both in the Chrome browser, and neither one works. The Chrome team should decide which way to go -- I'd prefer to see them go with the EMBED tag so my my Javascripts will work:
if (navigator.appName == "Microsoft Internet Explorer") {
    document.write("<BGSOUND SRC=\"[my-site]/audio/" + music + "\" LOOP=-1>"); }
else {
<!-- for Firefox, etc. -->
    document.write("<EMBED SRC=\"[my-site]/audio/" + music + "\" LOOP=\"true\" HIDDEN=\"true\">"); }
Re: How do I make chrome play an embedded midi file? Melanie12 8/23/09 10:41 AM
My sites do not work for midi files <embed> code. However, I came across a site that used this code, and the file worked.  I checked the code, and it was the <embed> code with some other additions to it.  I tried them on my site, and guess what, it still didn't work. Why it worked on another's site, and not mine just plain baffles me.  The only thing is rather than a midi file, it was a .wma file.  So I would like to know how to make the .mid file work as well.
Re: How do I make chrome play an embedded midi file? reginr 4/13/10 8:45 PM
its already April 2010, was a resolution found?  I'm writing an online music teaching tool using javascript and manipulating the data source, so far its working nicely with firefox, but not on Chrome... what to do now?
Re: How do I make chrome play an embedded midi file? auntiejane 5/31/10 8:58 PM
I am surprised that a new browser like Chrome will not play a BG Sound file. I didn't really expect Netscape to. Thought that Firefox might, and figured Chrome would for sure. I just have to recommend people use Internet Explorer on my sight as I want a few more sound files there.
Re: How do I make chrome play an embedded midi file? stanoman 6/7/10 8:14 AM
As I believe was said earlier, BGSOUND is not an HTML entity. So the fact that IE supports it is the IE teams decision. The fact that other browsers don't is their support of the HTML standard.
Re: How do I make chrome play an embedded midi file? nicksinternet 9/11/10 11:28 PM
WTF is the HTML standard then? I have sound embedded in my website and I need it to play.
Re: How do I make chrome play an embedded midi file? HOC13 11/15/10 7:58 PM
I have found a way to play background sound with all types of browsers including chrome. You can check it out here www.theproblemssolved.net

The code:

(NOTE: You will need to change the midi "type" to whatever it is you need.)

You first need to add an event listener...

if (window.attachEvent) {
        window.attachEvent("onload", setupSound);
}
else {
        window.addEventListener("load", setupSound, false);
}

function setupSound()
{
        if (navigator.appName == "Microsoft Internet Explorer")
        {
                var snd = document.createElement("bgsound");
                document.getElementsByTagName("body")[0].appendChild(snd);

                playSound = function(url)
                {
                        snd.src = url;
                }
        }
        else
        {
                playSound = function(url)
                {
                        var obj = document.createElement("object");
                        obj.width="0px";
                        obj.height="0px";
                        obj.type = "audio/mp3";
                        obj.data = url;

                        var body = document.getElementsByTagName("body")[0];
                        body.appendChild(obj);
                }
        }
}

I happen to use this for a rollover button sound, simple call:

playSound("www.yourdomain.com/sound.mp3");

and the sound will play :)
Hope this helps someone out there. I know I had to search long and hard for this answer!

www.theproblemssolved.net
Re: How do I make chrome play an embedded midi file? ReineSchokolade 7/30/11 6:54 AM
Very helpful - thank you - struggled and struggled to get it to work but then spotted that the onClick action to initiate the playSound was firing on the wrong element! Simply increasing the z-index of the elemenbt that contained the onClick resolved the matter. Then there was the question of an out of date plug in, but that is for another day.
Re: How do I make chrome play an embedded midi file? observeronline 12/2/11 10:16 PM
Truth is, lots of sound files embedded into web pages are fun to listen to.  I am very dissapointed that neither Chrome nor Firefox have automatic "sound play" for bgsounds in web pages. Now the Microsoft has realeased IE9 32/64 bit, I can have fast browsing and back ground sounds playing the way the page-author wanted me to experience my visit to his/her web page.

Boooo! to Chome and FireFox.  Part of the fun of web surfing is hearing a midi, .wma, mp3 , .wav in the background with the sound effects or music the author wanted us to hear------not just for IE but all browsers.

Let's get caught up with IE in this regard Mozilla and Google!  Sheeesh!
Re: How do I make chrome play an embedded midi file? sisbill 2/11/12 7:23 PM
You can make Chrome play a background sound using;
<EMBED
    SRC="http://www.gcpsolutions.info/badboys.mp3"
    HEIGHT=0 WIDTH=0>
The HEIGHT and WIDTH closes the visual box.
Re: How do I make chrome play an embedded midi file? Firedoc 2/23/12 10:56 AM
How many Years has the Browser been around, and every time an upgrade/update takes place, one of the Browser I use, either does not play background sounds, or it will play 2 of the 4 webpages that have a midi song for a background.  And I know I use an antiquated Frontpage 2003 to create my web pages, I just do not want to relearn another Web Authoring Software.

However, all 4 pages will play fine in I.E. 6, 7, 8, 9, half in Firefox and NONE in GOOGLE CHROME.  If it is not the midi, its how an advance image viewer of Ancestry.com will or will not work depending on the version of Firefox or I.E.

And if it is not the midi, or the image viewer, then it is Symantec Norton's Identity Safe or Safe Web not working...there never is a happy medium.  So I have 3 browsers installed just to make it thru the day.

Oh and lets not forget Microsoft "Not Responding" whenever it feels like...we spend more time exploring solutions to problems we did not create, than computer-ing.  And toss in some virsuses of worms, adware, malware, spyware, key loggers, drop viruses, trojans, unwanted cookies and we get it....s c r e w u s  We are only the consumer, end user, those who keep Microsoft, Google, HP, and the list goes on....gainfully Employed !    I wonder if India uses an HP with Microsoft Windows 7...or Bill Gates for that matter.
Re: How do I make chrome play an embedded midi file? Firedoc 2/23/12 11:14 AM
Update, I found this HTML code to add to my webpages with background midi's, problem is, now the Midi plays in Google Chrome, as it did not before when as <bgsound src="your sound/song.mid" loop="1"> of the web page properties, but does not in I.E. 9

What I found at  http://www.boutell.com/newfaq/creating/midi.html

<object data="mysong.mid">
<param name="loop" value="10"/>
If you're seeing this, you don't have a MIDI player on your computer.
</object>

And so on the same web page the midi played before with <bgsound src="your sound/song.mid" loop="1">  does not know with the HTML code above, and what does display is "If you're seeing this, you don't have a MIDI player on your computer."

Obviously I thought I had a MIDI Player as it played before.

And it plays in Chrome, but not when using <bgsound src="your sound/song.mid" loop="1">  and it does not Play in Firefox, when it did before.  So I will try both and see the results...maybe post the Lyrics with instructions to "Sing It Yourself !"