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
43
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

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
321
Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied. I'll send you a PM now. Cheers, Steve.
Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied...
It appears that MP somehow caches previously used subtitle files for subsequent use next time the same video is played. My problem...
Replies
2
Views
1K
You can find ton of guide here: https://www.avsforum.com/threads/madvr-player-support-thread.2215490/?post_id=39123050#post-39123050
You can find ton of guide here: https://www.avsforum.com/threads/madvr-player-support-thread.2215490/?post_id=39123050#post-39123050
Hi, I have a problem if I set madVR as Video Render. When I try to play my .mkv files I have an 'Unable to play. Video COdec...
Replies
3
Views
1K
Default Direct Sound Device was the problem. MPAR worked better than Dircect Sound, but is still a problem. Changed Audio Renderer to use the TV and it's working.
Default Direct Sound Device was the problem. MPAR worked better than Dircect Sound, but is still a problem. Changed Audio Renderer...
New computer build with Windows 11 Pro. MediaPortal 1.34 x64. When I pause a video the audio drops out. This only occurs when...
Replies
2
Views
1K
MP1 MP2 Lost new wiki page DE
Thanks! It's working now.
Thanks! It's working now.
A few months ago I started a new wiki page "SQL Server 2019" from a copy of SQL Server 2017 Express. Now I can't find it. Is there...
Replies
5
Views
2K
Top Bottom