Detecting when a video starts (1 Viewer)

davemj9876

Portal Member
August 1, 2011
9
0
Home Country
New Zealand New Zealand
Hi,
I don't know if this is possible or not, but here it goes:

I have a proof of concept plugin that displays the playlists from my iTunes installation. I can then select the playlist and it starts to play. (nothing clever, just starts playing from the start). This all works fine but once it starts playing iTunes is now in charge of the playback, So if I decide that I would like to watch a video, I would like my plugin to detect that this is the case, and send an instruction to iTunes to pause/stop playing the music.

Can anyone point me in the direction of some sample code for a plugin which does this, or is this not possible?

(this is all proof of concept at the moment, just seeing what I can do and not do with the MediaPortal API and the iTunes API)

Many thanks for any help

Cheers

David
 

crawshaws

Portal Member
October 1, 2010
11
0
Home Country
United Kingdom United Kingdom
Do you mean you want your code to know when a video is started in MP?

If so, there is an event in "MediaPortal.Players.g_Player.PlaybackStarted()"

This will trigger whenever a file is played and the event handler has a parameter called type which you will be able to see if it is a video or not.
 

Users who are viewing this thread

Top Bottom