Wiki Navigation
- Loading...
Purpose
- Required: Yes
- Type of Change: Bug Fix
If plugin replaces one of the MP internal media handling plugin it shall use these global messages to start media playing or viewing.
Description of Change
AutoPlay will now sent global messages when media is inserted or removed and when playing or viewing should start. This means that all playing related code has been removed from AutoPlay and it is now receiving plugin's responsibility to do wanted actions. Benefit is that any plugin can now take action and also 'Play Disc' shortcut will work with your plugin.
Message |
Description |
---|---|
message.Label |
drive letter |
message.Param1 |
media type see AutoPlay.MediaType |
message.Param2 |
media subtype see AutoPlay.MediaSubType |
message.Object |
file list as ArrayList |
Mantis Issue: |
|
---|---|
Related xml(s): |
- |
Windows IDs: |
- |
Related GUI control: |
- |
Author: |
-Manfred- |
Date added: |
Fri, 07 Jan 2011 |
XML/Code Samples
First step is to add message receiver to plugin if not already have one:
GUIWindowManager.Receivers += newSendMessageHandler(GUIWindowManager_OnNewMessage);
Then add message handling function:
privatevoid GUIWindowManager_OnNewMessage(GUIMessage message)
{
switch (message.Message)
{
caseGUIMessage.MessageType.GUI_MSG_AUTOPLAY_VOLUME:
if (message.Param1 == (int)Ripper.AutoPlay.MediaType.VIDEO)
{
if (message.Param2 == (int)Ripper.AutoPlay.MediaSubType.DVD)
OnPlayDVD(message.Label, GetID);
elseif (message.Param2 == (int)Ripper.AutoPlay.MediaSubType.VCD ||
message.Param2 == (int)Ripper.AutoPlay.MediaSubType.FILES)
OnPlayFiles((System.Collections.ArrayList)message.Object);
}
break;
}
Screenshots
This page has no comments.