Hmm… something off in terms of your calculations then. You can post a screenshot of your blocks or PM me with a link to your project and I’ll see if I can figure out why.
On a related note: does anyone know how to record a sound and stop recording using the new drag-and-drop interface?
A quick way to test this is to set a label to the value of [app variable time]. Then see if you get the expected value. For example, if you recorded for 15.59, you’d expect to get back 15.591274857134 or 15 if you’re rounding. If you’re rounding to the nearest second, add the [round] block that I have in my second screenshot.
I wanted to see if anyone knows if it’s possible to move to a different part of a song, by moving the slider? i.e. to rewind, fast forward by dragging the slider left and right.
I’ve been able to rig up a super basic progress bar which moves as the song progresses, but I want the user to be able to manipulate the position of the song.
I’m still trying to figure that out. I’ve also made a progress bar that displays elapsed time but am unable to find a way to shift audio position.
You’re project link isn’t working; would it be possible for your to share the project page?
Hmmm yeah I don’t know if it’s possible on Thunkable?
I had a bit of a muckaround in AppGuyver and was able to get it working there, but would prefer to use Thunkable if I can!
The other thing I tried was using a webviewer and hosting the song on my Wix website which has an audio player. But the sizing going between iPad and phone seemed impossible, and I’d prefer for this to work offline.
I’ve pretty much given up hope by now I’ve tried, like @muneer suggested counting the recording time but that still doesn’t allow me to change position in audio.
I had an idea. You can upload a song to YouTube Music and then use time parameters in the url to determine the starting point. For example, I added &t=46s to the end of this url to make it start at the 0:46 mark:
But currently that song is private in my account. I’m not sure how to set it to public. But if it was possible – and it’s definitely possible with YouTube videos – you could theoretically move a slider in Thunkable and have the app reload the sound at the desired position using url parameters.
Okay, I didn’t have much luck with that. For some reason, uploaded songs are not available to the public.
But I do have an example that offers one way of having a slider for playback. It’s just not customizable. If you add a Web Viewer and set the url to a YouTube Music song that is commercially available (e.g. this Chris Pureka song url which I’ve set to start at 0:46 → YouTube Music), when you press play (requires Thunkable Live), it opens a full-screen viewer at least on an iPhone and it includes a slider:
The only problem now is that you have to press play each time the song reloads. Also, I had to hard code the length of the song (242 seconds).
Soundcloud urls work similarly (except that the timestamp is formatted as #t=46s) but the web viewer isn’t as user-friendly as with YouTube Music and it doesn’t seem to respect the timestamp value.