[Laszlo-checkins] r13220 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf
bargull@openlaszlo.org
bargull at openlaszlo.org
Sun Mar 8 19:15:05 PDT 2009
Author: bargull
Date: 2009-03-08 19:15:03 -0700 (Sun, 08 Mar 2009)
New Revision: 13220
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSoundMC.as
Log:
Change 20090309-bargull-tGm by bargull at dell--p4--2-53 on 2009-03-09 02:14:09
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: handle invalid files in SoundMC
New Features:
Bugs Fixed: LPP-7880 (SWF8: mp3 loading responds with error-swf / onerror not dispatched) (partial)
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Invalid files still send onLoad(true), so check Sound.duration as a simple means to identify valid mp3-files.
Also call LzLoader#doError() instead of LzView#resourceloaderror() in order to remove requests properly from load-queue.
Tests:
testcase at bugreport
examples/music/music.lzx
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSoundMC.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSoundMC.as 2009-03-09 01:23:35 UTC (rev 13219)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSoundMC.as 2009-03-09 02:15:03 UTC (rev 13220)
@@ -1,7 +1,7 @@
/**
* LzSoundMC.as
*
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -148,9 +148,10 @@
* @access private
*/
SoundMC.prototype.loadDone = function (success) {
- if (success != true) {
- // LzLoader -> LzSprite -> LzView
- this.loader.owner.owner.resourceloaderror();
+ // @devnote Loading invalid files still results in a successful load,
+ // therefore check duration to identify valid mp3-files (LPP-7880)
+ if (success != true || this._sound.duration == 0) {
+ this.loader.doError(this.loader.mc);
if ($debug) {
Debug.warn("failed to load %w", this.reqobj.url);
}
More information about the Laszlo-checkins
mailing list