Sound issue

Q&A about the latest versions
Post Reply
mihai bodea
Posts: 82
Joined: Wed Jun 22, 2011 12:22 pm

Hello.

I have a Pano2VR Pro 5,2,3 version.
Recently I found some issues with sound on mobile devices and Chrome. It seems there are protocols that allow, or not, the sound to be played.
Here is an example: https://mostenireadeacasa.ro/. Clicking on the white text, top right corner, is supposed to play sound. This does not work on Chrome and Android devices, except after adding the url address to an exception list in the browser settings.

Updating Pano2VR might solve the problem, but my version is enough for me at the moment.
Is there a way to edit the output files so that they comply with the current browser standards?


Kindest regards,

Mihai
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mihai,
Over the years browsers, iOS and Android have changed their media policies and to this day it is still a lottery that the next update does not break the sound.
The most robust way is to use the video element to play an MP3 file as this will then use the Audio tags rather than WebAudio.
How I do this is to add the audio, mp3 files to the skin so Pano2VR v5 puts it into the media folder.
Then create the output, look at the media folder to see the file names, also the path, for example, media/skin_snd_dog.mp3
Note the file that was added to this skin was: dog.mp3
So Pano2VR converts it to skin_snd_dog.mp3, that's why you need to make an output first so you see the path and file name.

Then you can use a set value action with a video element to play the audio.
To stop the audio you can either use another Set Value action setting blank, so removing the file from the video element, or use a Media action to stop media, video element.
Project attched.
Regards,
Attachments
v5Audio.zip
(1.5 MiB) Downloaded 147 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mihai bodea
Posts: 82
Joined: Wed Jun 22, 2011 12:22 pm

Dear Hopki.

Thank you for the solution.
It seems to do the trick, except when the panorama changes, the sound stops and it should play for the entire visit.
Is there a solution around this?

Kindest regards,

Mihai
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mihai,
Select the audio player, then remove the Before Node Changed action.
That shoudl do it.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mihai bodea
Posts: 82
Joined: Wed Jun 22, 2011 12:22 pm

Thank you Hopki.

I use Pano2VR v.5, so there is no Before Node Changed action in my menu.
Attached you can find the project and skin. Could you, please, have a look and help me?
The tour only needs to play the sound in the browser.

Thank you,

Mihai
Attachments
Arcub_costum 2021_2.ggsk
(8.01 MiB) Downloaded 131 times
arcub.p2vr
(47.46 KiB) Downloaded 137 times
mihai bodea
Posts: 82
Joined: Wed Jun 22, 2011 12:22 pm

Dear Hopki,

I found a solution that I think it is complicated. I created a „host” page that plays the desired mp3 sound in the video player, as you recommended. On top of the video player there is an iframe that covers 100% of the screen with the „real” virtual tour. To play the sound I also added on top of everything a white rectangle with the alpha set to 0,01 that has the function to play the sound and to hide self.

Kindest regards,

Mihai
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mihai,
Hmmm, this does sound over-complicated, you're not just starting sound so what is it exactly you are doing?
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mihai bodea
Posts: 82
Joined: Wed Jun 22, 2011 12:22 pm

Dear Hopki.

I followed your advice and added sound in a video player, but each time I switched to another panorama in the tour, the sound stopped. You suggested to remove the Before Node Changed action, but there is no such thing in my version 5.
Adding sound seemed to work, as I updated some virtual tours in December and sound trigger only required an initial interaction. I did copy the exact same solution now, but it did not work.
In the end I preferred to lose the option to pause/play sound just to have it playing in the background. It also seems to me over-complicated, I would prefer to have a simpler solution for the next projects, but there was a deadline and I found a solution.

Is there a straight forward solution for this simple function?

Kindest regards,
Mihai
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mihai,
Pano2VR 5 was built for the standards of the time.
How sound works in browsers has changed a few times since V6 so not surprised it stopped working for V5 using the usual methods.
V6 should be fine.

The suggested workarounds were trying to get some sort of sound function back in V5.
The attached Pano2VR 5 project is a two-node project that plays sound all the time even when changing nodes.

The sound file can be added to output after Pano2VR 5 has made the output or as done here added to the skin so it is automatically added to the output, it is placed in the media folder and given a new ID which is a mix of the skins ID for the sound and the fact its located in the skin.

A rectangle has been added to act as a play button, this has the action to set the sound to the video element to play the sound.
The rectangle would be replaced with a text box asking do you want to hear the sound, Yes or No, if No, nothing happens and if Yes, set the sound to the video element to play.
Regards,
Attachments
audio.zip
(785.12 KiB) Downloaded 146 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply