Best Practice with Player object to determine audio or video

Klaus major-k klaus at major-k.de
Thu Jul 11 15:09:59 EDT 2019


Hi Paul,

> Am 11.07.2019 um 21:02 schrieb Paul Dupuis via use-livecode <use-livecode at lists.runrev.com>:
> 
> the mediaTYpes property returns tracks (and the documentation doesn't say whether the list is cr delimited or comma delimited, but that is a docs issue)
> 
> Are you saying that for example if (the mediaTypes of player X contains "audio" and not (the mediaTypes of player X contains "video")) is definitely an audio only media file? and conversely if (the mediaTypes contains "video") it is a video media file?
> If not media file has been set for the player, what does "the mediaTypes" return (once again, the documentation doesn't say!)
> 
> Is this an approach you have coded and used?

10 seconds of testing revealed this:
Filename not set -> mediatypes = EMPTY
Loaded a video without sound Default video of LC -> video
Loaded a video with sound MP4 -> video,audio
Loaded a sound file MP3 -> audio

I'll leave the conclusions to you! 8-)


Best

Klaus

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





More information about the use-livecode mailing list