- This topic has 15 replies, 3 voices, and was last updated 1 day, 12 hours ago by kdv.
-
AuthorPosts
-
2024-11-23 at 5:19 am #79030nsxdjxParticipant
When I need to stop the animation event after processing the audio playback, I only see play, pause, stop in the puzzle. Why is there no ended? Can you add corresponding functions?
2024-11-23 at 5:35 am #79031nsxdjxParticipantWhen I need to stop the animation event after processing the audio playback, I only see play, pause, stop in the puzzle. Why is there no ended? Can you add corresponding functions?
2024-11-23 at 6:56 am #79033xeonCustomerYou can use the IsPlaying puzzle to check if the audio is still playing back and if not then do some action. You can also attach an isPlaying to a DoWhile loop if needed.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-11-23 at 9:36 am #79035nsxdjxParticipantIsPlaying puzzle can check whether the audio is still playing, but it needs to loop continuously to judge, which will consume a lot of resources
2024-11-23 at 12:03 pm #79036kdvParticipantWhen I need to stop the animation event after processing the audio playback
get duration, use a timer. logic is very simple in your case…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-23 at 1:04 pm #79041nsxdjxParticipantHI KDV:
Using get duration sound is indeed another solution, but it has a drawback that when the audio is not playing, it is impossible to obtain the audio duration in advance. The console prints NaN, but if the audio is played once, it is indeed effective.Please take a look at the puzzle below:Attachments:
You must be logged in to view attached files.2024-11-23 at 1:27 pm #79044kdvParticipantPlease take a look at the puzzle below
yes, it won’t work this way. Your sound should be loaded beforehand to read its duration.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-23 at 1:47 pm #79047nsxdjxParticipantHI KDV:Your reply is a pure black background image, I didn’t see the content
2024-11-23 at 2:04 pm #79048nsxdjxParticipantHI KDV:I have seen your YouTube reply video. Thank you for your reply. My audio path and audio name are both variable concatenation, and the read audio file is also uncertain because it is not one audio, but many. So we cannot load all the audio as you demonstrated, and we need to determine which audio duration it is. If we add the ended feature in the new version, it will simplify many steps and increase the amount of code. My puzzle is as follows:
Attachments:
You must be logged in to view attached files.2024-11-23 at 2:48 pm #79052kdvParticipantI have seen your YouTube reply video
but you didn’t see the point (the procedure is repeated until it gets a sound’s duration and only after that the sound will be started. it will take max 0.1 sec). and no, your puzzles won’t work as you wish.
You now have three options: think and use logic to create a universal procedure to play your sounds (everything you need is in that example); hire somebody to do the job; wait for the grass to grow.
Improved variant of puzzles. Logic is really simple.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-25 at 3:18 am #79064nsxdjxParticipantHI KDV:Thank you for your patient reply. I have carefully reviewed your puzzle and implemented it in my project, but there is one issue that prevents me from achieving the final goal. If an audio is reloaded and replaced during playback, that is, when the duration changes, the after duration second timer needs to be reset and restarted. However, when the after second timer starts, the variable duration inside will not update or change. This means that the lack of an ended feature has led to a series of new issues and an increase in code volume. My puzzle is as follows
- This reply was modified 1 day, 23 hours ago by nsxdjx.
Attachments:
You must be logged in to view attached files.2024-11-25 at 1:42 pm #79074kdvParticipantsecond timer needs to be reset and restarted
Repalce this puzzle by this puzzle
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-25 at 1:52 pm #79075nsxdjxParticipantHI KDV:Can you share your puzzle and see where the remove timer has been added。
2024-11-25 at 1:59 pm #79076kdvParticipantthe “remove timer” puzzle was not used (it’s not needed). just replace the “after” puzzle with the “set timer” puzzle.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-25 at 2:15 pm #79077nsxdjxParticipantThe problem has been solved, thank you kdv
-
AuthorPosts
- You must be logged in to reply to this topic.