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


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
293
.....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
503
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
472
I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the video-playing overlay used for the other screens. Isn't there a single overlay .xml that displays in MyVideo, MyMusic, TVSeries, MovingPictures, etc. like the musicOverlay.xml does? Thanks! Update: ... Ooops...
I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the...
I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the...
Replies
0
Views
258
OK - Will care about ;)
OK - Will care about ;)
In version 1.36 (I think), technical specifications were added to the center panel of the movie info screen when 'Movie Info before...
Replies
3
Views
433
Top Bottom