-
Is it possible to set Media Player control like this?
Hi, ALL,
Is it possible to set some kind of property so that Media Player 10 displays only control panel?
I know there is a button on it so that when you click it is displaying this in compact mode as explained here link 1, but I want to do it programmatically.
Thank you.
-
Re: IS it possible to set Media Player control like this?
-
Re: IS it possible to set Media Player control like this?
Hi,
The code uses Windows Media Player as ActiveX control. It just references a lot of properties and functions that is used in there.
And yes - it does use an SDK and all different interfaces.
Thank you.
-
Re: IS it possible to set Media Player control like this?
So, why don't you want to read the docs about using Media Player ActiveX control and Media Player SDK?
-
Re: IS it possible to set Media Player control like this?
I did, but couldn't find anything...
I tried to use this:
Code:
if( show )
{
// m_pWMPPlayer->put_uiMode(wxBasicString(wxT("compact")).Get());
m_pWMPSettings->setMode(wxBasicString(wxT("compact")).Get(), VARIANT_TRUE );
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
else
{
m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Get());
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
but it does not do anything.
Thank you.
-
Re: IS it possible to set Media Player control like this?
What is m_pWMPPlayer?
Is your system "Windows Media Player 10 Mobile"? If yes then have a look at http://msdn.microsoft.com/en-us/libr...v=vs.85).aspx:
Quote:
Windows Media Player 10 Mobile: This method only specifies a BSTR set to "none" or "full". On Smartphone devices, only playback status and a counter are displayed when setting uiMode to "full".
-
Re: IS it possible to set Media Player control like this?
Victor,
No, it's a laptop.
The Player says I have:
Windows Media Player Version 12.0.7601.17514.
Is version 12 a culprit? Does it have the same interface as 10?
Thank you.
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
Is version 12 a culprit? Does it have the same interface as 10?
Doesn't documentation say anything about it? :confused:
BTW, you didn't answer my question:
Quote:
Originally Posted by
VictorN
What is m_pWMPPlayer?
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
VictorN
Doesn't documentation say anything about it? :confused:
BTW, you didn't answer my question:
To answer your question:
Code:
IWMPPlayer* m_pWMPPlayer;
Thank you.
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
I did, but couldn't find anything...
I tried to use this:
Code:
if( show )
{
// m_pWMPPlayer->put_uiMode(wxBasicString(wxT("compact")).Get());
m_pWMPSettings->setMode(wxBasicString(wxT("compact")).Get(), VARIANT_TRUE );
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
else
{
m_pWMPPlayer->put_uiMode(wxBasicString(wxT("full")).Get());
m_pWMPPlayer->put_enabled(VARIANT_TRUE);
}
but it does not do anything.
Thank you.
And what do all these methods return?
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
VictorN
And what do all these methods return?
Code:
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_uiMode(
/* [in] */ BSTR pbstrMode) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setMode(
/* [in] */ BSTR bstrMode,
/* [in] */ VARIANT_BOOL varfMode) = 0;
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_enabled(
/* [in] */ VARIANT_BOOL pbEnabled) = 0;
Maybe WMP 12 does not support "compact" mode? Or maybe it just can't be set thru the API, only thru the running interface?
Thank you.
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
Code:
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_uiMode(
/* [in] */ BSTR pbstrMode) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setMode(
/* [in] */ BSTR bstrMode,
/* [in] */ VARIANT_BOOL varfMode) = 0;
virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_enabled(
/* [in] */ VARIANT_BOOL pbEnabled) = 0;
:confused:
I didn't ask you about these methods' signatures! I know it. :cool:
What do they return in your case? Or didn't you debug your code? :confused:
Quote:
Originally Posted by
OneEyeMan
Maybe WMP 12 does not support "compact" mode? Or maybe it just can't be set thru the API, only thru the running interface?
Maybe. At least MSDN doesn't mention this word in IWMPPlayer description here
-
Re: IS it possible to set Media Player control like this?
Is there a way to speak with someone in MS about it for FREE?
Thank you.
-
Re: IS it possible to set Media Player control like this?
Maybe Microsoft Connect?
BTW, you haven't answer my question yet:
Quote:
Originally Posted by Victor
What do they return in your case? Or didn't you debug your code?
-
Re: IS it possible to set Media Player control like this?
Both of them return S_OK.
If I uncomment the first line it returns E_INVALIDARG.
Thank you.
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
OneEyeMan
If I uncomment the first line it returns E_INVALIDARG.
Well, that means that the value returned by
Code:
wxBasicString(wxT("compact")).Get()
is not a valid parameter for IWMPPlayer::put_uiMode method.
Did you try some other parameters?
-
Re: IS it possible to set Media Player control like this?
For the reference here is the link to the MS Q&A: http://answers.microsoft.com/en-us/w...1-2e680a4684bb
Thank you.
-
Re: IS it possible to set Media Player control like this?
The article says:
Quote:
Remarks
This method specifies the appearance of the embedded Windows Media Player. When the BSTR specified in put_uiMode is set to "none", "mini", or "full", a window is present for the display of video clips and audio visualizations. This window can be hidden in mini or full mode by setting the height attribute of the OBJECT tag to 40, which is measured from the bottom, and leaves the controls portion of the user interface visible. If no embedded interface is desired, set both the width and height attributes to zero.
-
Re: IS it possible to set Media Player control like this?
Quote:
Originally Posted by
Igor Vartanov
Good catch, Igor! :thumb:
And sorry, I missed this first paragraph of the Remark section! :blush:
BTW, Windows Media Player 11 SDK IWMPPlayer::put_uiMode doesn't mention "compact" as possible word either!
-
Re: IS it possible to set Media Player control like this?
No doubt, from the very beginning that "compact" mode was something artificial and not implemented natively by player control itself. Besides, in WMP application it might be a sort of custom UI mode alright, and therefore, having nothing comparable in embedded control.
-
Re: IS it possible to set Media Player control like this?
Hi, guys,
@Igor,
Please refer to the beginning of this thread - the very first message contains the link which talks about compact mode. But it talk about it from the player user point of view. Maybe this is the catch?
Also 1 more questions:
The OBJECT the quote is talking about is IWMPPlayer interface, right? So in my case the code will look like:
Code:
m_pWMPPlayer->set_uiMode( "full" );
m_pWMPPlayer->height = 40;
-
Re: IS it possible to set Media Player control like this?
Just not to be confused, I'm working with C++.
Thank you.
-
Re: IS it possible to set Media Player control like this?
The mentioned compact mode exists in WMP application and has nothing to do with UI modes of the embeddable control explained in the article. Whatever language you use, you are to control the video rendering area visibility by the control's height.