Bug 21889
Summary: | Sound recorder/playback applet doesn't load and/or show recorder buttons | ||
---|---|---|---|
Product: | WebKit | Reporter: | Paul de Haan <p.de.haan2> |
Component: | Java | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | p.de.haan2 |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
URL: | https://pum.sipnl.net/src/options_um.php |
Paul de Haan
This URL has a login defined to get to this page. Please contact me for details.
The page is on a VoIP system's Unified Messaging Server. I've set aside a test-account for access.
I know that the system developers use Mason to (dynamically) generate pages.
The recorderapplet works in f.e. Firefox and Camino. It doesn't work in any version of Safari and/or WebKit. I;ve tried to find out through the Web Inspector where it may fail and why. I can't find it.
In order to have the audio recording etc. work, the java.policy has to be updated - as I did.
Below is the possible part of the code that WebKit struggles with:
var applet;
function recorderStatusChanged() {
if ( navigator.appName.indexOf( "Netscape" ) != -1 ) {
applet = document.embeds[0];
} else {
applet = document.RecorderClientApplet;
}
var i = 0;
while( 1 == 1 ) {
var td = document.getElementById("Recorder_Control_"+i);
var IFEBehaviour = false;
if (window.pageWithIFE && pageWithIFE) {
IFEBehaviour = true;
}
if (td && !td.className.match(/(^|\s+)recorderButtons(\s+|$)/, "g")) {
IFEBehaviour = false;
}
if( td == null ) break;
var status = applet.get_status(i);
if( status.match(/Idle/i) == null ) {
if( status.match(/Selected/i) == null ) {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play_na.gif" title="Not Available">\
<img src="/images/recorder/rec_na.gif" title="Not Available">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
} else {
if( status.match(/Play/i) == "Play" ) {
td.innerHTML = '<nobr>\
<img src="/images/recorder/pause.gif" title="Pause" onClick="applet.pause();">\
<img src="/images/recorder/stop.gif" title="Stop" onClick="applet.stop();">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
}
if( status.match(/Pause/i) == "Pause" ) {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play.gif" title="Resume Play" onClick="applet.play();">\
<img src="/images/recorder/stop.gif" title="Stop" onClick="applet.stop();">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
}
if( status.match(/Record/i) == "Record" ) {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play_na.gif" title="Not Available">\
<img src="/images/recorder/stop.gif" title="Stop" onClick="applet.stop();">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
}
}
} else {
if( status.match(/New/i) == "New" && status.match(/Old/i) == "Old" ) {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play_modified.gif" title="Play" onClick="applet.play('+i+');">\
<img src="/images/recorder/rec.gif" title="Record" onClick="applet.record('+i+');">\
<img src="/images/recorder/undo.gif" title="Undo" onClick="applet.undo('+i+');"></nobr> ';
} else {
if( status.match(/New/i) == "New" || status.match(/Old/i) == "Old" ) {
if (IFEBehaviour){
td.innerHTML = '<nobr>\
<img src="/images/recorder/play.gif" title="Play" onClick="applet.play('+i+');">\
<img src="/images/recorder/rec.gif" id="recButton_' + i + '" class="hiddenBlock" title="Record" onClick="applet.record('+i+');">\
<img src="/images/recorder/rec_na.gif" id="recButtonNA_' + i + '" title="Not Available">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
if ( window.currentEditedID != undefined && currentEditedID == i){
UM_setEditStatus(null, i);
}
} else {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play.gif" title="Play" onClick="applet.play('+i+');">\
<img src="/images/recorder/rec.gif" title="Record" onClick="applet.record('+i+');">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
}
} else {
if (IFEBehaviour){
td.innerHTML = '<nobr>\
<img src="/images/recorder/play_na.gif" title="Not Available">\
<img src="/images/recorder/rec.gif" id="recButton_' + i + '" class="hiddenBlock" title="Record" onClick="applet.record('+i+');">\
<img src="/images/recorder/rec_na.gif" id="recButtonNA_' + i + '" title="Not Available">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
if ( window.currentEditedID != undefined && currentEditedID == i){
UM_setEditStatus(null, i);
}
} else {
td.innerHTML = '<nobr>\
<img src="/images/recorder/play_na.gif" title="Not Available">\
<img src="/images/recorder/rec.gif" title="Record" onClick="applet.record('+i+');">\
<img src="/images/recorder/undo_na.gif" title="Not Available"></nobr> ';
}
}
}
}
i++;
}
}
function barInit(n) {
progressBarInit(33,430, n);
}
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Java applet support is long gone, closing.