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

Similar threads

MP1 MP2 NAS DE
And just found out that "if" the NAS has turned off, MePo sends the WOL when i again try to access the shares.. Love that feature :)
And just found out that "if" the NAS has turned off, MePo sends the WOL when i again try to access the shares.. Love that feature :)
Small question. Since MEPO 2 apprently is dead, and i have to switch back. Is there a way to ensure that the NAS will be started...
Replies
3
Views
444
Last weekend, I uninstalled the entire mediaportal, the TV server, the Windows patches, and anything else that might be interfering. I made a backup of the plugin databases so I could restore them after the installation. Now everything works. I'm not exactly sure what was causing the problem, but now all the videos play perfectly again.
Last weekend, I uninstalled the entire mediaportal, the TV server, the Windows patches, and anything else that might be...
Until yesterday, my config was win 10+mepo 1.36. This config could play any kind of video without errors. I've updated mepo to...
Replies
6
Views
552
Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
I used to run the TVService under the "NT Service\TVService" account to follow least privileges principal (not exposing my whole...
Replies
3
Views
1K
Well, all that remains is to find someone who will add this render if it is a render.
Well, all that remains is to find someone who will add this render if it is a render.
Are there plans to support other video renderers? MadVR got added a while ago, but this a 'hardcoded' selection in the...
Replies
23
Views
2K
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
1K
Top Bottom