Retrieving info about media being played.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
rupes
Posts: 9
Joined: Thu Jan 13, 2011 11:52 pm

Retrieving info about media being played.

Post by rupes » Thu Jan 20, 2011 10:45 am

Alright, I'm starting to understand LiveCode app building a bit better.

However, I can't seem to find out how I can retrieve data through the built in media players or the external QuickTime player. What I'd like to do access EXIFF info for the file, and also current position (time) of the playing media. How can I do this?

Also, is it possible to retrieve this info from the standard iPhone media player?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Retrieving info about media being played.

Post by bn » Thu Jan 20, 2011 11:14 am

Hi rupes,

look at currentTime in the dictionary.
CurrentTime is the time elapsed. 0 is the start position, the duration -> dictionary, is the overall duration. The unit of the duration is depending on the timescale -> dict. of the movie you are playing in the player.
E.g a movie can have a timescale of 600. This means 600 intervalls per second. Another movie can have a timescale of 100, i.e. 100 intervalls per second. The timescale is determined when the movie is made. Most Quicktime movies have a timescale of 600 but not all.

A 10 second movie with a time scale of 600 will have a duration of 6000
A 10 second movie with a time scale of 100 will have a duration of 1000

The length of a movie in seconds is duration/timescale.

You can get and set the currentTime of a player.

For the iPhone I did not test this.

Kind regards

Bernd

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Retrieving info about media being played.

Post by Klaus » Thu Jan 20, 2011 11:29 am

Hi Rupes and Bernd,

since video playback is currently very basic on iOS it does not (yet) support
these features available through QuickTime in the desktop version of LiveCode.


Best

Klaus

rupes
Posts: 9
Joined: Thu Jan 13, 2011 11:52 pm

Re: Retrieving info about media being played.

Post by rupes » Thu Jan 20, 2011 8:13 pm

Klaus wrote:Hi Rupes and Bernd,

since video playback is currently very basic on iOS it does not (yet) support
these features available through QuickTime in the desktop version of LiveCode.


Best

Klaus
So currently the only info that can be retrieved for any media (video and audio) being played on an iDevice is the name of the program/track/filename and length/time related info? And actually not even time related info for iPhones?

Post Reply