Exportation Errors

#1

There are built in methods in Wick that allow you to
access extra information about your project’s assets.
Examples:


Assign an asset to a variable.
projAsset =wickEditor.project.library.getAssetByName(‘bam.mp3’);

Alert the asset’s uuid.
alert(projAsset.uuid);

Alert name of track.
alert(projAsset.filename);

Alert duration of a track.
alert( wickEditor.audioPlayer.getDurationOfSound(projAsset) );


The project runs fine in the editor, but when exporting it, you
get an error… :frowning:
Is there a way around this?

All help is good help!

2 Likes

#2

i don’t really know.
and… by any chance… do you know where the admins went? i feel like they haven’t been around for quite a while.

1 Like

#3

Yeah it’s really weird, it’s like a ghost
town. :joy:
But all joking aside, I don’t know really. I assume they’re
just really busy, but I do miss them dropping by.
Maybe they’re still working on those new tutorials they
mentioned earlier.

1 Like

#4

Hey Guys,

Sorry we’ve been out for a while, we’ve had a few personal matters to attend to. Would you be able to send me exactly the error you are getting? (Through the console, if possible).

Working around the designated API could cause a whole number of issues, so we’ll need to wrap these in some safer commands!

Also, is this legacy or live editor?

1 Like

#5

I hope things have gotten better for you. :slight_smile:

I initially got it in the Legacy editor, but I tried
out the Alpha quickly this morning with no success either.

Legacy editor:


The project runs fine in the browser, but once exported,
(Doesn’t matter if it’s a zip file, or a html page.) it pops up this
message.
Looking into the console reveals:

I’ve since found a workaround by not using
wickEditor.audioPlayer.getDurationOfSound();
in the actual code, but instead just finding and recording the sound lengths into
a variable.

Alpha version:


I only tinkered around a little with this one, so maaaaybe there’s a
better way to do it in this version?

image
alph

This is the code I typed, and the error that resulted.

0 Likes

#6

Is the hope here that you can access the length of the sound in the asset library? If so, I can potentially add this functionality in!

2 Likes

#7

Yes! I was using it as a workaround to loop music in the Legacy editor.
The Alpha of course now has a built-in loop ability, but I’m using it as a temporary
way to loop audio, and later convert it to Alpha if needed. If you could add the
ability in, it would help loads, and save how much code needs to be re-written!
:slight_smile:

0 Likes