Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Donnerstag, 27. Oktober 2016, 00:06

Multiple playsounds in VR mode

Hi Guys,

I wasn't too sure where to ask this question within the thread. I am trying to have multiple sounds being played on VR mode. I have a few panos each pano with a certain number of hotspots who's onclick activates the sounds. Since the VR mode requires an initial user-interaction for the playsound, I created an event where the user presses on the VR button headset and records this as a user interaction. Then my code fires a set of playsound(id,...,...); methods to have the sound objects created.





I chose to keep the mute paramter to true, that way the sounds are being played without the user realising it. Then at this point i am in VR mode and I go onto a specific hotspot in a different scene, which only plays the sound of the last playsound () method. Then later on in my code for each hotspot I set


At this point the played sound will be that of the sound.




I would very much appreciate your help if anyone could give me any insight on this issue.


Thank you so much *smile* *smile*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Aladdin_VR« (19. Januar 2017, 14:31)


Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Freitag, 28. Oktober 2016, 11:20

Hello

You do not succeed to do this using the standard Sound Interface Plugin.

Try this:
http://krpano.com/plugins/userplugins/html5vraudio/#top

Best regards
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Donnerstag, 3. November 2016, 10:30

Figured out a way

Hi Thanks for your reply spacerywirtualne.

I managed to figure it out by loading all the sounds at the very first touch and then the rest is just calling the preloaded sound.

I am trying to do the same thing in order to bypass the constraints for videos (which require a user interaction). Creating an event where onmousedown calls an action that plays and pauses all the videos. That way second I click on the VR headset the user has already interacted with the pano (using the touchworkaround). However as soon as I move to another scene where there is another video. It still requires a touch. Do you have any idea about this ?

Thanks once again ;) ;-) ;-)

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Donnerstag, 3. November 2016, 10:51

Hi

I know that, and it is strange. Video VR mode does not start automatically. You have to touch the screen and it is troublesome, but only on Android and Google Chrome. On the IOS video starts immediately without touching. Android Firefox works well. I do not know if this Android or Chrome bug *huh*


Maybe Klaus write something in this matter.



Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

5

Donnerstag, 3. November 2016, 12:19

Hey thanks for your reply ;)
Yes i agree it's weird. I'm assuming since it works on android firefox, it must surely be a chrome issue and not an android one.

I used the same trick with the sound to bypass the need for a user interaction. I set up the onmousedown event to playall the sounds (muted) thus creating the objects, and the onmouseup to stopall the sounds. This preloads all the sound and creates the sound object. Therefore upon wondering the scenes, it remembers the sound objects. Unfortunately, the video is not created the same way since I am calling it off a hotspot.

I can use this method when the videos are on the same scene and make them work in VR mode, but as soon as I go in VR mode and move to another scene, it requires a user interaction.

No of any smart tricks to keep the flow going while changing scenes in VR mode. *tongue* *squint* ?

Best

A.E

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

6

Donnerstag, 3. November 2016, 13:21

Hi

I have no problem with the audio, only distorted video hotspot in VR mode does not runs on start .


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

7

Donnerstag, 3. November 2016, 15:27

have found a trick to bypass it

Hi,


Until Klaus helps shed some light onto this I've managed to find a way that makes it seem like it's working up until, Chrome decides to support autoplay. (temporary fix)

The logic is to have an event that plays the all the videos on the first touch (using the onmousedown function). Then when navigating to the other scenes, simply play around with the keep= "true" attribute and the onstart="true/false" attrbutes to have the video you would like to be clicked on when in VR to "autoplay".

The idea here is to make use of the first click when the user clicks on the VR headset and take that as a userinteraction to load all the videos required, so when in VR mode we can have a functionality that looks like autoplay.

I hope this could help Piotr.

A.E

azureart

Anfänger

Beiträge: 1

Wohnort: Zürich, Switzerland

  • Nachricht senden

8

Freitag, 13. Januar 2017, 18:37

Does it really worked?

Good evening at all.
@aelboudali did you ever tested this way?

We created some scripts, wich catch the first touch event, to control some Audio and Videos at the Start-Scene.
So actually we can play or handle with javascript all videos / audios in the first screne (also we can play multiple audio files at the same time without some problems).
If we change the scene, we lost every control of the videos. we also tried to put all videos in the first scene also with keep="true" but there going to be lost on change in VR mode?!
We use the <audio> Tags outside of krpano in the normal HTML Template, we still can handle them on changing the scene with Javascript, because they don't need some "visible" in VR mode.

Do you have an example of playing videos in VR on changing the scene? and u still can control them after the change without a touch on iOS and Android?

P.S. We found out, if you bookmark a tour as a Home-Screen-Bookmark on iOS, it doesen't need a touch anymore! Hope this help some other Peoples! Like an Trusted-Web-App for iOS!

Thanks for the help and have a nice weekend!

Ähnliche Themen