You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although this issue does not occur when the same code is run in the p5 editor when I run the code in my own development environment, the function .currentTime() does not work properly on Chome and Firefox. (Works fine on Safari)
Here is the p5.js sketch on the editor with .currentTime() properly functioning Here is my personal development environment (click the thumbnail and hit the play button)
In this project, I use .currentTime() to show a time bar at the bottom and to loop through an array of words for the subtitles. Whenever I first start the audio, the function does not work. The console shows 0 as the .currentTime() regardless of whether the audio is playing.
I have found that if I refresh the browser, the function responds and works but only till I pause the audio. If I play it again, it does not continue to work.
These are the errors in the console:
Chome
-The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
-Uncaught TypeError: Cannot read property 'length' of undefined
Firefox
-Use of the orientation sensor is deprecated
-Use of the motion sensor is deprecated
-TypeError: arraySequence[0] is undefined
*The function works fine on Safari
The text was updated successfully, but these errors were encountered:
This issue was solved by visiting the link above and realizing that I had been using an older version. I was using V 0.3.12 (Jan 6th, 2020). Downloading the newer version V 1.4.0 (Jan 24th, 2021) from the p5 website fixed all the issues with p5.sound.
Although this issue does not occur when the same code is run in the p5 editor when I run the code in my own development environment, the function .currentTime() does not work properly on Chome and Firefox. (Works fine on Safari)
Here is the p5.js sketch on the editor with .currentTime() properly functioning
Here is my personal development environment (click the thumbnail and hit the play button)
In this project, I use .currentTime() to show a time bar at the bottom and to loop through an array of words for the subtitles. Whenever I first start the audio, the function does not work. The console shows 0 as the .currentTime() regardless of whether the audio is playing.
I have found that if I refresh the browser, the function responds and works but only till I pause the audio. If I play it again, it does not continue to work.
These are the errors in the console:
Chome
-The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
-Uncaught TypeError: Cannot read property 'length' of undefined
Firefox
-Use of the orientation sensor is deprecated
-Use of the motion sensor is deprecated
-TypeError: arraySequence[0] is undefined
*The function works fine on Safari
The text was updated successfully, but these errors were encountered: