The “Spatial Audio” sample on your website seems to be a little bit different from the current samples 0.20.0. On your website audio is played automatically but therefore the selected instrument moves together with the camera (therefore it’s not really spatial). When I build the sample scene locally, the instruments are placed correctly on the ground but the audio does not play.
Is there any other sample that uses autoplay?
Another thing I noticed that might be related to this issue: I have build a usdz-scene with Reality Composer Pro that autoplays audio. This scene works on iOS 18 devices but on iOS 17 the audio is not played. So the autoplay feature might depend on the iOS version? Btw: the needle Spatial Audio scene does not auto play audio neither on iOS17 nor iOS18.
To address your issue regarding autoplaying audio in iOS-AR with Needle Engine, there are several factors to consider.
Autoplay Policies: iOS, especially in versions like 17 and 18, can have strict autoplay policies that may prevent audio from playing automatically unless certain conditions are met. It’s essential to ensure that audio playback is initiated through user interaction to comply with these policies.
Needle Engine Components: Ensure you are using the correct audio components in Needle Engine. The setup for audio sources should follow the guidelines provided in the documentation for the specific version you’re working with. For example, in recent Needle Engine versions, make sure the audio clip is properly attached to an audio source and that the playOnAwake property is set.
Sample Projects: The “Spatial Audio” sample can help you understand how to set up audio, but since you mentioned it plays differently, you may want to look into other available samples or tweak your existing ones. Check the samples repository for any that may demonstrate autoplay more effectively.
Reality Composer Pro: For the USDZ scene you built, it’s possible that differences between iOS versions could affect how audio components function within AR experiences. Testing with simplified scenes can also help isolate the issue.
To help you further, I recommend checking the following:
Ensure your audio source has the playOnAwake option correctly set.
Look into any differences between your locally built scene and the sample scenes provided.
Review the Needle Engine documentation for any recent changes regarding audio handling.
If you can provide further details about the specific versions of Needle Engine and any relevant code you’re working with, it could help narrow down potential solutions.
Feel free to ask if you need more specific examples or guidance!
Thanks for the suggestions. I try to describe my issue more clearly.
I tested the sample scene “SpatialAudio” from the Needle Showcase website. When I open the scene with quicklook, audio starts playing automatically. So, everything is fine.
Now I opened this scene in Unity and build it locally, without any changes. When I open this locally-build scene, the audio does not play automatically. And from another different behaviour (spatial AR) I suggest, that this Unity demo scene has probably changed and is not the one that was used to create the demo scene on the needle website.
I am looking for a demo scene with audio autoplay. The showcase shows that it’s technically possible, but I could not reproduce it.
Therefore my question is: is there any other demo scene available where audio autoplay is shown?
Thank you for providing a clearer description of your issue.
It seems that you are experiencing a difference in audio autoplay functionality between the Needle Showcase and your locally built scene in Unity. This inconsistency could stem from various factors, including project settings, versions of Unity or Needle Engine, and the configuration of audio components.
To address your request regarding demo scenes with audio autoplay, you can consider the following steps:
Check Additional Demo Scenes: Aside from the “SpatialAudio” sample, look for other available demo scenes in the Needle Engine samples repository. There may be other scenes that successfully demonstrate audio autoplay.
Explore GitHub Samples: Visit the Needle Engine Samples Repository to examine and test different samples that may have implemented autoplay functionality. Although not all samples may illustrate it perfectly, you can find closely related implementations.
Examine Documentation: Review the Needle Engine documentation for any additional information about audio handling, particularly regarding autoplay within AR environments. This can provide insights into any necessary configurations.
Reach out to the Community: If you’re not finding what you need, consider reaching out on forums or community channels related to Needle Engine where other developers may share their experiences or additional samples they have created.
Local Project Configuration: Ensure that the project settings for audio playback in Unity align with what’s required for autoplay (e.g., setting the audio source properties correctly).
If you continue to encounter issues, it would be helpful to know the specific versions of Unity and Needle Engine you are using, as well as any specific code configurations related to audio. This additional information could help in diagnosing the problem more accurately.
Let me know if you need further assistance or specific guidance!
1 replies left - Get a PRO license for more AI replies. thread_TcFKJG6S4PeZXWbGKQKZRy8Y Reply to this message to continue the conversation
That’s strange – audio autoplay definitely should still be working, I’m not aware of a regression there.
We’re in the process of releasing a new samples package with the scenes updated to the latest Engine version right now, I’ll make a note to test this specifically and notify you here. Thanks!
Thanks for taking care!
Today I made another observation that might be relevant for the testing:
The way the “SpatialAudio” sample works, is dependent on the iOS-version. You can check it with the version available on your samples site.
iOS 17: Scene is displayed in spatial AR; audio autoplay not working
iOS 18: No spatial AR - instruments are attached to the camera; audio autoplay working
The sample scene built locally with an iOS18 device behaves like the version from your website with an iOS 17 device: spatial AR, but no audio.
Hope this helps to investigate the issue. Best regards.