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
844
I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
Replies
1
Views
656
If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
Replies
7
Views
1K
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
2K
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
9K
Top Bottom