Best Practice with Player object to determine audio or video

Curry Kenworthy curry at pair.com
Thu Jul 11 15:53:53 EDT 2019


Paul:

 > Is this an approach you have coded and used?

Yes. If you had some code using your mediaType getprop, such as:

   if the mediaType of player 1 is "Video" then -- do something

It could become, for example (a minimal change):

   if the mediaTypes of player 1 contains "Video" then -- do something

Etc. Used successfully in familiar contexts.

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/




More information about the use-livecode mailing list