Wait for an audio file to end playing until new action possible?
Hi all
I'm playing a sound file in my VR. While it's playing I want all onkeydown events to be disabled. Is this possible somehow? Thanks a lot Josh |
I would make use of a variable 'audioPlaying = True/False' that's being checked everytime a key-event occurs.
snippets: (I use self here since I think in classes/objects) Code:
def playAudio(self, file): Code:
def onkeydown(self, key): Code:
viz.callback(viz.MEDIA_END, self.audioEnded) |
All times are GMT -7. The time now is 06:20 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC