Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) How do you play midi files on chrome? (Read 8,492 times)
Miss Emily
Junior Member
**
Offline



Posts: 93
How do you play midi files on chrome?
Apr 15th, 2012 at 2:04am
Post Tools
Does anyone know a code that will play midi files on all browers?

The standard embed tag plays audio files on Internet Explorer, but it doesn't work on Google Chrome.

Any information would be greatly appreciated.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,365
Location: Earth

YaBB 2.6.1
Re: How do you play midi files on chrome?
Reply #1 - Apr 15th, 2012 at 3:08am
Post Tools
Based on the number of complaints about Chrome not playing midi files - the answer could well be that you can't. Apparently Chrome doesn't support midi files.
http://code.google.com/p/chromium/issues/detail?id=42553&can=1&q=embed%20midi&co...

I knew there was a reason - aside from not being able to find my fracking bookmarks - I didn't like Chrome.  Angry
« Last Edit: Apr 15th, 2012 at 3:09am by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #2 - Apr 15th, 2012 at 4:43am
Post Tools
Chrome is probably the fastest web browser which is why I like to use it.

It's strange because it can play WAV and MP3 files on a browser, but not MIDI files for some reason.
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #3 - Apr 15th, 2012 at 8:34am
Post Tools
Miss Emily wrote on Apr 15th, 2012 at 4:43am:
Chrome is probably the fastest web browser which is why I like to use it.

It's strange because it can play WAV and MP3 files on a browser, but not MIDI files for some reason.

I like to use Chrome, too, but I usually go with Firefox.

The following code will play a MIDI file in Chrome, and also Safari:

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


Unfortunately, the code above doesn't seem to work in Firefox or Internet Explorer. I guess you could include two different codes so that all browsers will play your chosen MIDI file, but I haven't tested that yet.

Edited:
While the code above should work in Chrome, at least it did for me, the code in this post is more comprehensive, i.e., it will work in Chrome, Firefox, Internet Explorer, and Safari.
« Last Edit: Apr 15th, 2012 at 9:32am by Bill Myers »  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #4 - Apr 15th, 2012 at 9:01am
Post Tools
The code you provided doesn't work on Chrome for me. It displays the "If you're seeing this" error message. Does it mean I need a plug-in or something?
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #5 - Apr 15th, 2012 at 9:12am
Post Tools
I believe that Chrome uses QuickTime for its default player, but that's probably dependent upon what plug-ins you have installed.

Regarding Chrome, and plug-ins, this page might help.
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #6 - Apr 15th, 2012 at 9:28am
Post Tools
Update:

I found another way to play a MIDI file in Chrome. This also works in Firefox, Internet Explorer, and Safari. I confirmed this myself in each of those browsers.

The following is what helped (referenced here):

Quote:
If you have control over the web page and can modify it, then you can tweak it so it works in all browsers:

Open the html file for the page in a text editor like Notepad.

Find this line (near the top):

<bgsound src="howgreat.mid" loop="2">

Replace it with this:

<object data="howgreat.mid" type="application/x-mplayer2" width="0" height="0">
<param name="filename" value="howgreat.mid">
<param name="playcount" value="2">
<param name="autostart" value="1">
</object>

It does exactly the same thing only it's standards compliant and will work in all browsers.

If this doesn't work for you, then it's simply a matter of installing the required plug-in, which is what others may have to do as well.
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #7 - Apr 15th, 2012 at 11:47am
Post Tools
I'm surprised code works for you, but not for me.

It says "No plug-in available to display this content."

Thanks for your help but I've given up with it.
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #8 - Apr 15th, 2012 at 6:33pm
Post Tools
Miss Emily wrote on Apr 15th, 2012 at 11:47am:
I'm surprised code works for you, but not for me.

It says "No plug-in available to display this content."

Thanks for your help but I've given up with it.

If it's any consolation, even after you correctly add the proper code to play a MIDI file, or you reference any other media file, it's not uncommon for an error message to be displayed to let that person know they need to update their browser with a specific media player, and/or a plug-in.

The good news is that once this is done for any given media file with any given browser, that browser will always be able to play that type of media.

So except for occasional updates to any given media player or plug-in, this would be a one-time installation.

Well, for each browser for any that need it.  SighRoll Eyes
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #9 - Apr 15th, 2012 at 10:01pm
Post Tools
With Internet Explorer, they let you know that you need to install a plug-in in order to play midi files, and they provide a link at the top to run.

Google Chrome shows an error message, but doesn't provide a link, therefore basic surfers wouldn't know what to do.
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #10 - Apr 16th, 2012 at 12:58am
Post Tools
Miss Emily wrote on Apr 15th, 2012 at 10:01pm:
With Internet Explorer, they let you know that you need to install a plug-in in order to play midi files, and they provide a link at the top to run.

Google Chrome shows an error message, but doesn't provide a link, therefore basic surfers wouldn't know what to do.

At least when I tried playing a MIDI file with Chrome, an option was given to play the file once, or all the time.

Additionally, after I followed the instructions that I posted here in this topic, I was also given the option to use the plug-in that had been installed for Internet Explorer.

On a related note, it seems that Chrome will play MIDI files if plug-ins have been installed for either Safari or Firefox.

If this is important to you, especially since surfers to your site will evidently get different messages depending on what they have or haven't installed, you may want to place a notice on your site to indicate that a certain song should be heard on your site, and if it isn't being heard they can download the appropriate plug-ins.

Or just give them another way to play the song, i.e., give them a direct link, and let their browser tell them what they need to play it.

To be perfectly frank, all you can really do is to do what it takes for you to hear your MIDI file in all browsers, and then not worry about whether or not other people can hear it. Otherwise, this issue will drive you nuts.

This is the nature of the Internet.  Roll Eyes
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #11 - Apr 16th, 2012 at 3:01am
Post Tools
Wait a minute, it works now. I still had the "embed" code on the page and that interferred with it.

Once I removed it, and just kept the "object" code that you provided, it worked beautifully on both Chrome and Explorer.

Thank you so much Bill.
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #12 - Apr 16th, 2012 at 7:58am
Post Tools
Miss Emily wrote on Apr 16th, 2012 at 3:01am:
Wait a minute, it works now. I still had the "embed" code on the page and that interferred with it.

Once I removed it, and just kept the "object" code that you provided, it worked beautifully on both Chrome and Explorer.

Thank you so much Bill.

Oh, good! I'm glad you got it to work.  Smiley

Ironically, until you mentioned it here, I had inadvertently done the same thing, and fixed it by taking out that embedded code like you had done. I just didn't think to mention it as a "fix" for you. Still, you figured it out.


I'm reminded of a recent edit I made to add a particular sponsor to our forum. The forum seemed to be working just fine after the edit except that I suddenly realized I was no longer able to scroll through the text of a new message, nor was I am to scroll to edit an existing message. This was an irritating problem.

Almost 2 days passed before I figured out what caused the problem.  Huh

This problem affected my use of Firefox. But more importantly, it affected my use of an older version of Netscape, which I like to use because the older version renders the text of longer lines all on one line (like in YaBB's code box) ... handy for scrolling up and down in a straight line to very quickly edit a bunch of lines at once.

This didn't affect my use of Internet Explorer, but again, that browser doesn't keep longer lines of text on one line. So it had its limits when I needed to quickly edit a bunch of lines.

It finally dawned on me that I must have done something in the forum to alter the way it worked. The only change I could think of was the addition of a sponsor's ad, and sure enough, that was what had caused the problem.

So I changed the way the ad renders itself, and I was able to once again use an older version of Netscape to more quickly edits longer lines of text.

Whew!  Roll Eyes
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Miss Emily
Junior Member
**
Offline



Posts: 93
Re: How do you play midi files on chrome?
Reply #13 - Apr 16th, 2012 at 8:18am
Post Tools
So I guess both the "embed" and "bgsound" syntax/code should not be used anymore with many new browsers not compatible.

Yes I hear you. Things look different, or may not work on different browers which is why tests need to be done on all of them. It would be nice if all browsers were the same.
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,675
Location: Los Angeles

YaBB 2.5
Re: How do you play midi files on chrome?
Reply #14 - Apr 16th, 2012 at 8:43am
Post Tools
Yes, that seems to be the case, and I agree; it would be nice if all browsers were the same.

I sometimes forget to test the different browsers to check how an edited page may look.

Now we have iPads and other tablets, which I might add, YaBB looks great on an iPad. Although, come to think of it, embedded media files won't play on an iPad.
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top