musipedia.org// ?
Deutsch  English  Français  中文 
 

Logging in is required for posting.

Special forum features: inserting music notation, posting audio recordings.

All Categories > Musipedia > Musipedia Features > Results pages hangs
Total Posts: 2 - Pages (1): [1]
user picture Author: rt
Posted: Dec 02 2007 - 03:42 PM
Subject: re: Results pages hangs
Which browser and which media player were you using?

I am posting below what currently happens on the result page, depending on which browser is used. If you tell me whether you used IE or Firefox, and which media player, we should be able to pinpoint the Javascript function that caused the problem, and maybe we can come up with something that works better. I already try to keep the players from starting on their own, but either I am doing something wrong or the browsers or media players just ignore that.

Here's the current code (the function playMedia is called for every matching MIDI file). It is already a few years old, so some adjusting to current browsers and media players might be a very good idea.


function playMedia(mediaURL,height,width,from,to) {

var mediaURL,height,width;

if (GetBrowser() == "Netscape")
embedMPlayer(mediaURL,height,width);
if (GetBrowser() == "IE")
embedIEobject(mediaURL,height,width);
if (navigator.appName.substring(0,5) == "WebTV")
embedSource(mediaURL,height,width);
}

function embedSource(mediaURL,height,width,from,to) {

var CodeGen = "";
var mediaURL,height,width;

CodeGen = '<embed src="' + mediaURL + '"' + '\n' ;
CodeGen += ' height=' + height + ' width=' + width + 'autostart="false" starttime="' + from+ '" ENDTIME="'+to+'" \n';
CodeGen += ' LOOP="false"' + //rpt +
'>';

document.write(CodeGen);

}


function embedMPlayer(mediaURL,height,width) {


CodeGen = "";
var mediaURL,height,width;

CodeGen = '<embed type="application/x-mplayer2" ' + '\n' ;
// http://www.microsoft.com/Windows/MediaPlayer/
CodeGen = CodeGen + 'pluginspage="http://www.apple.com/quicktime/download/" ' + '\n' ;
CodeGen = CodeGen + 'Name="MediaPlayer" ' + 'src="' + mediaURL + '" '
+ '\n' ;
CodeGen = CodeGen + 'autoStart=0 ' ;
if ((height == 24) && (width == 299))
CodeGen = CodeGen + 'ShowStatusBar=1 ';
if ((height >= 50) && (width >= 200))
CodeGen = CodeGen + 'ShowStatusBar=1 ';
if ((height <= 49) && (width != 299))
CodeGen = CodeGen + 'ShowStatusBar=0 ';

CodeGen = CodeGen + 'playCount=1' + ' ' ;
CodeGen = CodeGen + 'volume=-1 ' ;
CodeGen = CodeGen + 'HEIGHT=20' + ' WIDTH=' + width + '>'


document.write(CodeGen)

}

function embedIEobject(mediaURL,height,width){


CodeGen = ""
var mediaURL,height,width

CodeGen = '<object id=Player' + '\n' ;
CodeGen +=
'codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902'
+ '\n' ;
CodeGen += 'type=application/x-oleobject height=' + height + ' width='
+ width + '\n' ;
CodeGen += ' standby="Loading Microsoft® Windows® Media Player components..." ' + '\n' ;
CodeGen += 'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> ' +
'\n' ;
CodeGen += '<param NAME="Filename" VALUE="' + mediaURL + '">' + '\n' ;
if ((height == 24) && (width == 299))
CodeGen += '<param NAME="ShowStatusBar" VALUE= "true">';
if ((height >= 50) && (width >= 200))
CodeGen += '<param NAME="ShowStatusBar" VALUE= "true">';
if ((height <= 49) && (width != 299))
CodeGen += '<param NAME="ShowStatusBar" VALUE= "false"> ';

CodeGen += '<param NAME="autoStart" VALUE="false"><param NAME="Volume" VALUE="-1">' + '\n' ;
CodeGen += '<param NAME="playCount" VALUE=1' + '></object>'

document.write(CodeGen);

}
Author: proudprimate
Posted: Dec 02 2007 - 02:59 PM
Subject: Results page hangs
When using "Search the Web", even when I get only two results, the browser hangs and has to be put out of its misery with Task Manager, because the little black media players say they're "connecting", and no other keys will make any difference beside CTRL-ALT-DEL. I can't even back out with CTRL-LEFT nor the mouse.

A better policy would be to render these demonic machines inert until the user CLICKS one of them. As it is, they both (all, in the case of more than two) plunge into the abyss as soon as the Results Page is shown, never to be seen again.
Total Posts: 2 - Pages (1): [1]
You must login to post a message to this conference.

How to insert music:

Add a bit of sheet music, along with a MIDI file, simply by entering note names in Lilypond syntax between the [L] and [/L] tags.
For example, you can try what happens if you enter: [l]g'4 g'4 d''4 d''4 e''4 e''4 d''2[/l] (use the Preview function if you don't actually want to post this).
You can create these lists of note names by clicking on piano keys here.

How to post an audio recording:

If you just want to sing, whistle, or play a melody so that other forum visitors can hear it, follow these steps:

  1. Record your audio here.
  2. You should notice a 32-character hash code, something like: 2a40281c5001c5a7d8c9f57fcdeccfaf
  3. copy this hash code and paste it into a forum post, enclosed in the audio tags, for example: [audio]2a40281c5001c5a7d8c9f57fcdeccfaf[/audio]

How to mark a thread as solved:

If the original question in a thread is solved, please mark it as solved using the "solved" icon (or by just typing [solved] into your post). This makes life easier for people who are willing to identify melodies, since unsolved problems are easier to spot that way. If a problem turns out to not be solved after all, just write [/solved] in a new post, and the thread will be labeled accordingly.

Smart Method AI Smart Method AI melbet online