Video Play Event Trigger (1 Viewer)

mightymike

New Member
December 28, 2008
1
0
Is there a way to use the event trigger for when a video is started? I would like to build a plugin that will dim my lights when a video is started.
 

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
44
Texas
Home Country
United States of America United States of America
You are looking for an Action, not an event. In your plug-in override the OnAction method and listen for the Action.ActionType.ACTION_MUSIC_PLAY action. Don't be misled by the name, it is called ACTION_PLAY_MUSIC but it is triggered for any sort of playback. Maybe a relic from the old days? I dunno.

You can see the implementation in Moving Pictures here. Your's will probably need to be a little different because I assume you're doing a process plug-in rather than a window plug-in. Never messed with the process stuff so maybe some method names are a little different, but generally that is what you want to do.

Good luck. ^^
 

Users who are viewing this thread


Write your reply...

Similar threads

i love how subtitles are implemented in the MP2 videoplayer, this is just perfect. 1080p playback is also very good. But video playback in MP2 is buggy when playing 4k material. Therefore: PLEASE add an option for an external video player! I'd LOVE to have VLC back as videoplayer, like in MP1! This works perfectly. You will make a...
i love how subtitles are implemented in the MP2 videoplayer, this is just perfect. 1080p playback is also very good. But video...
i love how subtitles are implemented in the MP2 videoplayer, this is just perfect. 1080p playback is also very good. But video...
Replies
0
Views
532
.....it was also the culprit for me!!! Can't think why I've changed from LAVsplitter to MPurl ......:oops: Videos playing now.....so thanks!
.....it was also the culprit for me!!! Can't think why I've changed from LAVsplitter to MPurl ......:oops: Videos playing...
Just upgraded to 1.37 'Willow'.....and although TV is fine.....I'm unable to play video. Error message points to Mpeg4IsoAvc or...
Replies
12
Views
1K
To other people reading about this 'issue', Doskabouter provided me with a fix/patch. It is a modified version of tswriter.ax which solved the problem with dolby digital plus audio. I want to thank Doskabouter for all his time and energy he put into resolving this!!
To other people reading about this 'issue', Doskabouter provided me with a fix/patch. It is a modified version of tswriter.ax which...
Hi all, I could use some help with the following; OS: Win11 24H2 TV server: 1.37.000.0|x64 (working with Mediaportal for maybe 20...
Replies
4
Views
671
Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it requires extensive metadata scraping that I don't need. Is it possible to instantly access the video categories when landing on the page? I would like to display a single media page with the following...
Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it...
Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it...
Replies
0
Views
636
Those folder's last modified time isn't really accurate it seems. Latest change was a merge from PR #384 on may 3rd which was exactly that fix, see f.e. MediaPortal-1/mediaportal/MediaPortal.Application/MediaPortal.cs at 8fa4ccca20059a5534a029266efa596e83387f5b · MediaPortal/MediaPortal-1
Those folder's last modified time isn't really accurate it seems. Latest change was a merge from PR #384 on may 3rd which was...
Now that MediaPortal has gone 64-bit, any references to lParam should be converted to int64 rather than int32 or compared to zero...
Replies
7
Views
444
Top Bottom