Multiple Quicktime driven MP3/MP4 Track Player

Klaus major-k klaus at major-k.de
Sun May 6 13:55:56 EDT 2018


Hi Francis,

> Am 06.05.2018 um 19:46 schrieb Francis Nugent Dixon via use-livecode <use-livecode at lists.runrev.com>:
> 
> Hi from Beautifull Brittany,
> 
> I built an app which plays indivdual MP3 and MP4 tracks from a list (one line per filename).
> Simple play sequence (1 - show player - start player.  2 -  hide player - stop player).
> I can stop the play function anywhere during the play sequence, but must eventually  hit  "Stop"
> before manually selecting the next "Play" sequence ..... (I think ......).
> Now I want to hang on a multiplay sequence : choosing random line numbers to play a succession of
> tracks, until the cows come home.
> How do I know that an MP3/MP4 track has ended, before stopping and starting another play sequence ?
> (Please don't tell me I can calculate the duration, 'cos the strategy isn't perfect and doesn't satisfy me ....)
> Hazy explanations using strange commands found in the dictionary and on Internet, are nowhere near clear
> enough for me to code the script (I'm Irish!, although I have more than 25 years Hypercard and LiveCode).
> I reckon that Jacque or Klaus could come up with an answer. I have seen them answering similar queries. 
> OH ! I'm on Mac 10.12.8 but only Livecode 5.5 (I'm a poor retired engineer !), using Quicktime.
> 
> The answer is out there ....... !!

:-)

You could use the "playstopped" message in the card or stack script to check which player has stopped and
take appropriate actions.

If you need to see if the sound has really ended and the player has not been stopped manually by your user(s),
in case you have implemented this, you could then check "the currenttime" against "the duration" of the player, capisce?

> -Francis

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list