Closed Bug 168889 Opened 22 years ago Closed 7 years ago

ns4 plugin fails to play midi

Categories

(Core Graveyard :: Plug-ins, defect, P4)

x86
Windows ME

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: bozie, Assigned: peterl-bugs)

References

()

Details

(Whiteboard: [PL2:NA])

User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2a) Gecko/20020915
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2a) Gecko/20020915

this tag <embed src='http://bozman.net/midi/" + song + ".MID' hidden=false
align=baseline border=0 width=144 height=16 controls=smallconsole autostart=true
autoplay=true LOOP=1 volume=80></embed>
fails eo run the plugin.
Win-32-sea.exe 09/11 ver 1.2a with ns4 plugins copied to mozilla works ok
however all win32-sea.exe 1.2b versions 09/12, 09/13, 09/14, 09/15 fail to
run the plugin. error popup says unknown file extension.
This is true with mime type audio/midi, audio/x-midi, audio/wav, audio/x-wav
the only type tested. 

Reproducible: Always

Steps to Reproduce:
1.load mid embeded web page
2.
3.

Actual Results:  
grayed out embed box displays, error popup says unknown file type.
plugun fails to play midi or wav

Expected Results:  
played the embed midi using assigned application, in this case the copied ns4
plugin.  I trie adding these mime types in prefs with no change in results
error popup verbatum:
Unkown Extension on file
c:\windows\application data\mozilla\profiles\bozie\eu84vzsh.slt\e42b3e05d01
which 4x plugin you are using?
Assignee: beppe → serge
from Richard's e-mail:
>I copied all the ns4 plugins to moz.  The player the runs is the default ns4 lugin
>for au,wav,mid etc It displays the black toolbar with stop, start, volume
>controls. This is the original liveconnect since ver 3 I believe.
>from about plugins in ns4 ...
>
>File name: C:\PROGRAMFILES\NETSCAPE\COMMUNICATOR\PROGRAM\plugins\npnul32.dll
  
using win32-sea.exe ver 1.2b 09/11 I see helper apps listed for midi and midi
does paly ok from <embed>. However using any 1.2b ver (09/12 - 18) there are no
helper apps listed in prefs. Midi does not play reguardless of which plugins ore
in the moz/plugins folder. Also cannot enter any helper apps in mov ver's 1.2b.
This is probably the problem helper apps horked. 
Richard, if you need a plugin to play audio/midi content I can recommend
QuickTime 6.0, it does not require file extension, unlike old 4.x npaudio,
but currently mozilla does not save file extension in the cache, bug 90558.
vers 1.2a uses the npaudio fine. Just the change to 1.2b started this file not
found item.  The url is passed to the plugin with file extention. THe cashed copy
worked in 1.2a ok and is a cryptic random id. I deleted the plugins entirely
testing both 1.2 a/b and both seem to write the same style cached name. I don't
think this is the problem. Are the helper apps disabled" I cant seem to enter
anyting there. that is remembered example realaudio types. Why doesn't mov write
all the file types like ns4 does? If using the ns4 plugins is void, them remove
references to do this in the how-to info pages. 
1.2a does a copy any plugins file from browser cache into tmp dir with file
extension, that was kind of workaround for bug 90558 in 1.2b I removed that hack:(
because only a few plugins refuse to work w/o file extension, and in the future
plugin manager implementation we'll provide the UI & backend to select such kind
of plugins.

Serge: should this be duped against the plug-in manager work?
it not exactly a dup but definitely it depends on plug-in manager, mark it so.
Status: UNCONFIRMED → NEW
Depends on: 19118
Ever confirmed: true
I killed scripting for ns4 npaudio, installed QT6. I have been testing this all
month long. Here are my observations.
1) QT lacks needed get items, get  isLoaded(), isPlaying, isDonePlaying.
2) Qt must be re-installed if you unintall/reinstall mozilla. booooooo!
(if you don't reinstall, you get exceptions trying to script get's or set's via
js. Here is the test page I have been hacking. 

Http://bozman.net/family/jukebody2.html

I tested with full moz uninstall,delete all moz folders except plugins, after QT
was installed and same after re-installing mozilla nightly then re-install QT.
This **** up uninstalling and installing nightlies. Our uninstall is losing ref
to the QT plugin ... or is becomming invisable to QT after installing nightly.
Ver number change ??? Mime type association change.

This only seems to affect scripting since a unscritpted embed will play the
src'ed file.  So js scripting gets hosed by uninstalling/re-installing mozilla
and using the previously installed QT plugin.
I'm a fresh user.  Like Mozilla except for two things: 1) Kind of slow on load 
and 2) can't get midi plug-in to work.  Here is the html code that won't play.  
I believe the object part is valid html, and the embed part is for older 
browsers.  The music plays in IE6 and in Opera 6.

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
  align="baseline" border="0" width="0" height="0" type="audio/x-midi">
  <param name="src" value="hark.mid">
  <embed src="hark.mid" align="baseline" border="0" width="0" height="0" />
</object>

Tried getting the NS plugin.  What a bad experience.  Got Quicktime, but no 
Mozilla plug-in success.  This is a really bad usability issue.
Thomas: what is the URL to this code, so we can test it
http://ww.happyhavengraphics.com/index.htm Line 149 (20 lines from the
bottom).

Remember--the Mozilla problem is that making a multimedia plug-in work is
like pulling teeth.  This may be as much a design flaw as an actual function
defect.

Tom Haws
http://www.happyhavengraphics.com/index.htm Line 149 (20 lines from the
bottom).

Remember--the Mozilla problem here is that making a multimedia plug-in work is
like pulling teeth.  This may be as much a design flaw as an actual function
defect.

Tom Haws
I have completed the mozilla js QT controled jukebox. It seems to work fine.
Load and copy any thing you like. You can see how to code QT on this page ...

http://bozman.net/family/juke2.html
future
Assignee: serge → peterl
Priority: -- → P4
Whiteboard: [PL2:NA]
Target Milestone: --- → Future
Do you mean fixing this is a future item?

Is it true that Mozilla won't play a midi as an <embed> (which I think is not 
compliant code) or an <object> (classid="CLSID:22D6F312-B0F6-11D0-94AB-
0080C74C7E95)?

Isn't this like a major limitation?
The jukebox on your home page works perfectly fine for me. I can
stop/play/forward to the next song.

1) Do not use npaudio. Mozilla does not support the Java based scripting that
npaudio used in 4.x. Mozilla will automatically pick up *only* the plugins it is
compatbile with from the 4.x plugins location published in the registry.

2) Make sure you have QT 6 installed and configured to play midi. You can
validate if it's configured correctly by looking at the mime types and file
extentions in about:plugins. You can have the full path of DLLs listed in
about:plugins revealed by changing the plugin.expose_full_path pref in all.js.

3) Scripting plugins in Mozilla requires an XPT file to be installed at the same
time as the plugin. It's probably best just to install QT after installing the
browser such that its installer will put nsIQTScriptablePlugin.xpt in the
components folder. This needs to be installed at the same time as the plugin and
you can use the xpt_dump utility from the daily Gecko sdk zips to view the
scripting interface methods for QT.

Gecko does work with the OBJECT tag w/ NPAPI plugins based on mime type or file
exention but does not work with Active-X classids out of the box.
Status: NEW → ASSIGNED
As I understand, the closest thing for a standard way to play a midi file is 
the following code:

<OBJECT data="hark.mid"
            type="audio/x-midi"
            width=0 height=0 alt="Hark the Herald Angels Sing midi">
</OBJECT>

Can Mozilla handle this?
yes
PC
MS XP Home.
Mozilla 1.6

I think this relates to the same problem under discussion and I would ask the
question:

On encountering: 

<embed SRC="http://www.smickandsmodoo.com/aaa/oldcodgers/3rdmantheme125.mid"
width=128 height=45 controls=console autostart="false" volume="100%" loop="true">


If Mozilla 1.6 is smart enough to know to refer you for a plug-in to:
http://plugins.netscape.com/plug-in_finder.adp?mimetype=audio/midi

Why is it not smart enough to read the Helper Applications configuration:

mimetype: audio/midi
//OR
mimetype: audio/mid
//OR
mimetype: audio/rmi

Action: Always open with: c:\program files\vanbasco\vmidi.exe

and open the file?   (vmid.exe also happens to be the default application for MIDI)

It would appear to me that the selection logic is incorrect, and the H-App
config is not addressed before a decision is taken to get a plug-in.  In my
humble opinion, if it obeyed the H-App instruction it would not need to seek a
plug-in.

Anyone care to explain why this happens and if it can be overcome?

(BTW: I have QT6 but I _do not_ want it to be the default MIDI player.)



The following page does not work with Mozilla 1.7 and previous:

http://cards.webshots.com/scripts/sndplayer.fcgi

It works correctly with Netscape 4.79 and Internet Explorer 6.0.  Using my usual
midi application (Creative Labs), no music is played at all.  Using QuickTime
6.1.5, it sometimes plays and sometimes hangs.   When it does play, the music is
very choppy and full of skips.

The tests at:

http://www.mozilla.org/quality/browser/front-end/testcases/plugins/miditests.html

work correctly with the Creative Labs midi player.  Again, with QuickTime 6.1.5
the sound is very choppy and full of skips.
Thomas re comment #17. 
22D6F312-B0F6-11D0-94AB-
0080C74C7E95 is the old Windows Media Player < 7 ActiveX classID. You also gave no type attribute for embed. Unless you have the geckoActiveX control installed, Firefox will ignore the classID and use the <embed> statement, which isn't formatted properly. As long as Windows Media Player is capable of playing MIDI files, it should work as long as you set up the embed statement properly. 

If you have Gecko ActiveX control installed, then it will embed the ActiveX control, which won't be scriptable if you have WMP > 7 because you should have used classID 6BF52A52-394A-11D3-B153-00C04F79FAA6 instead. I haven't tested it with MIDI files, but here's an object that works with WMA. You can try using it and replace the .wma url in the <embed> and <param> statements with a .mid URL


<object id="MediaPlayer1" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
         type="application/x-oleobject" 
	standby="Loading Microsoft Windows® Media Player components..." 
	width="440" height="330">
<param name="url" value="1.wma">
<param name="showControls" value="true">
<param name="Volume" value="10">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="1.wma" width="440" height="330" showcontrols="true" playcount="true" volume="-20"></embed>
</object>

Also, remember to use autostart="1" and not autostart="true" if you want it to play automatically.

Thomas: re comment #13. The reason that MS plugins don't work in Mozilla is that they rely on Java's liveconnect (NS4) and because Microsoft only has kept their ActiveX plugins up-to-date. I've heard from the grapevine that Microsoft is working to remedy this situation.
Thomas: I tested a .mid for both classid, and both and worked, so your problem was the type attribute missing. By the way, I suggest no one use WMP for embedding sounds. I also suggest using Flash whenever possible instead of WMP for audio/video (unfortunately, for MIDI, Flash requires a plugin http://www.alexisisaac.net/products/flashMidi/) but if you record the music as standard audio, Flash will encode it using MP3 compression.

<object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
         type="application/x-oleobject" 
        standby="Loading Microsoft Windows® Media Player components..." 
        width="440" height="330">
<param name="url" value="beatles.mid">
<param name="showControls" value="true">
<param name="autostart" value="true">
<param name="Volume" value="10">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="beatles.mid"
width="440" height="330" showcontrols="true" playcount="true" autostart="1"
volume="-20"></embed>
</object>

and

<object id="MediaPlayer1" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
         type="application/x-oleobject" 
        standby="Loading Microsoft Windows® Media Player components..." 
        width="440" height="330">
<param name="url" value="beatles.mid">
<param name="showControls" value="true">
<param name="autostart" value="true">
<param name="Volume" value="10">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="beatles.mid"
width="440" height="330" showcontrols="true" playcount="true" autostart="1"
volume="-20"></embed>
</object>
QA Contact: shrir → plugins
> I also suggest using Flash whenever possible instead of WMP
for audio/video

That made me chuckle now that we have the HTML5 video/audio tag.


But if we are at it, is this bug still there and what's currently the best way for playing MIDIs on the web?
I would think a combination of HTML5 audio and JS could easily handle MIDI files.
I'm marking this bug as WONTFIX per bug #1269807.

For more information see - https://blog.mozilla.org/futurereleases/2015/10/08/npapi-plugins-in-firefox/
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.