Pocket PC Forum / End Users / Multimedia / October 2007
embed media player 9 in a html file and display it on pocket pc 20
|
|
Thread rating:  |
Peter - 22 Oct 2004 19:39 GMT Hi,
I am developing an application that requires displaying video file using media player on my iPaq 4700 using internet explorer. I have media player 9 on pocket pc.
I wrote a html file that embeds the media player as an object. I use
CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95
when embed the media player.
But somehow, when I load the htm page to my pocket pc, the internet explorer doesn't show the player at all on the page.
I would really appreicate if anybody can provide some suggestions.
Thanks,
Peter
Neil Smith [MVP Digital Media] - 23 Oct 2004 15:32 GMT Yes, you also need to load the WM ActiveX control for PPC which isn't supplied by default with the player. Look in the SDK documentation folders, you'll find a file called wmnall.exe - run this and it will install the PPC ActiveX to your device.
Embedded media player should then be possible - though for WMP9 using this control, Pocket IE will crash & burn if you use PARAM tags in the object. The workaround is to pass in params using javascript once the page has loaded.
HTH CHeers - Neil
>Hi, > [quoted text clipped - 16 lines] > >Peter Peter - 24 Oct 2004 09:23 GMT Neil,
Thanks for the reply. After I installed wmnall.exe on my PPC, I could load the WMP embedded html page on my PPC. However, two problems remain:
1) how to use javascript to add parameters
For example, if I want to add the following:
<PARAM NAME="Filename" VALUE="\My Documents\wm_sample.wmv">
how should I use javascript to add?
2) as I mentioned in another post, the display seems to be screwed up. After loading the html page, if I trigger a pop up menu, it will stay on the screen and overlapping with the media player even after I turned the menu off. Or when I use the scroll bar to move the page up and down, the WMP disply doesn't referesh fast enough, which causes the window being splitted, and some unwanted lines appearing. Is there any solution for this, such enlarge memory or something?
Thanks for your help and I appreciate it.
Peter
> Yes, you also need to load the WM ActiveX control for PPC which isn't > supplied by default with the player. Look in the SDK documentation [quoted text clipped - 29 lines] > > > >Peter Neil Smith [MVP Digital Media] - 24 Oct 2004 13:42 GMT Peter - is there any reason you started a new thread ? I find it hard to follow this stuff if you throw away the thread information and begin a new one. Anyway - comments inline :
>Neil, > [quoted text clipped - 8 lines] > >how should I use javascript to add? Let's assume you used an HTML ID of 'Player' for your embedded media player. Then you would set the URL as follows : call this onload from your body tag
function loadplayercontrols() { Player.FileName="\\My Documents\\wm_sample.wmv"; Player.Play(); }
Note the double backslash in Local file paths, as Javascript uses \ as an escape character, so \\ is equivalent to a single \
>2) as I mentioned in another post, the display seems to be screwed up. After You did ? Which other post ? Where ? There are about 28000 messages in this newsgroup, let alone others. Perhaps rather than me searching for the post, you could add it to this thread ?
>loading the html page, if I trigger a pop up menu, it will stay on the screen >and overlapping with the media player even after I turned the menu off. Or [quoted text clipped - 40 lines] >> > >> >Peter Peter - 25 Oct 2004 06:35 GMT Neil, sorry to make it difficult to follow. Just ignore what I have said about "other post" and also the other thread.
Thanks for providing the example on adding parameters using javascript. That's very helpful.
Now here is the display problem. After loading the html page, if I trigger a pop up menu, it will stay on the screen and overlapping with the media player even after I turned the menu off. Or when I use the scroll bar to move the page up and down, the WMP disply doesn't referesh fast enough, which causes the window being splitted, and some unwanted lines appearing. Is there any solution for this, such enlarge memory or something?
By the way, I am working on a HP iPaq 4705 (running PPC 2003) with WMP 9 on it. But I could get any other model for my project. Just to let me know my options.
Thanks,
Peter
> Peter - is there any reason you started a new thread ? I find it hard > to follow this stuff if you throw away the thread information and [quoted text clipped - 75 lines] > >> > > >> >Peter lauysstephen - 07 Nov 2004 04:38 GMT hi, i am using HP ipaq 4150 Pocket PC 2003. I have wrote following cod to get data from a video streaming server, which use windows medi encoder. However, it just can stream audio, but can display video. Is any idea to solve?? ----------------------------------------------------------- <html>
<body>
<h1>Test video streaming</h1>
<object id="Player" width="200" height="220" classID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject"> </object>
<script language="JScript"> // Initialize the variables needed // to store the marker information. var fileNames = new Array();
// This function opens and plays the specified file. function openFile(filename) { if (filename) { Player.FileName = filename; } else { alert("You must enter a file name first."); } } </script>
<script for="Player" event="Error()" language="JScript"> alert(Player.ErrorDescription); </script>
<form> <b> Video Server Address:<br> </b> <input name="filename" type="text" size="15" /> <input type="button" value="Open" onClick="openFile(filename.value) /> <br /> </form>
</body>
</html> -----------------------------------------------------------
> *Neil, > [quoted text clipped - 45 lines] > > HTH > > CHeers - Neil - lauysstephe
Neil Smith [MVP Digital Media] - 07 Nov 2004 13:39 GMT You said : >However, it just can stream audio, but can display video.
So, is your problem with audio, or is ithe problem the video?
Cheers - Neil
>hi, i am using HP ipaq 4150 Pocket PC 2003. I have wrote following code >to get data from a video streaming server, which use windows media [quoted text clipped - 96 lines] >> > >> > * Peter - 24 Oct 2004 09:37 GMT Neil,
Essentially, what I am trying to do is to have a cutomized WMP, with some extra control buttons (like pause, cut, etc.) added to the skin. I am not sure what is the best way to do it. I checked using embedded vc++ 4.0 or visual studio .net 2003 for developing a standalone application, but I haven't found any useful clue for doing what I need to do. Using html page and javascript seemed to be a good choice. But with the problems I have encounted so far, I am not sure neither.
So any insights would be highly appreciated.
Peter
> Yes, you also need to load the WM ActiveX control for PPC which isn't > supplied by default with the player. Look in the SDK documentation [quoted text clipped - 29 lines] > > > >Peter JWHL - 16 Nov 2004 23:00 GMT <<<The workaround is to pass in params using javascript once the pag has loaded.>>>
How do I do that? How do I "pass in params using javascript"???...ca you post an example of a simple code???...I just want to use PocketI to play a file already on my PDA....The IE page on my PDA contains th text to an audio book and the mp3 on my PDA contains the reading o it...I'd like to follow along using just one program (PocketIE)...An help in this regard is very much appreciated...Thank yo
- JWH
Neil Smith [MVP Digital Media] - 18 Nov 2004 10:36 GMT Well, each <PARAM NAME = "parameter name" VALUE = "parameter value"/> has a corresponding Javascript value which you can use to set it, instead of adding the PARAM tag (which crashes the player).
Full examples are in the SDK, it's too verbose to list here, but lets try some : Add this to the BODY tag of your HTML.
<body onLoad="loadplayercontrols()">
<object id="Player" width="240" height="240" class="back" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject"> </object>
The BODY onload="blah" will ensure the javascript doesn't try to set up the player object *before* the page loads completely (and therefore would generate javascript errors)
Then try in the HEAD of your HTML page :
<script language="javascript"> function loadplayercontrols() { // Player.EnableFullScreenControls=true; // Player.TransparentAtStart=true; // Player.VideoBorderWidth=15; // Player.VideoBorderWidth="#FFCC00"; Player.ShowGotoBar=true; Player.ShowControls=true; Player.ShowPositionControls=true;
// Player.FileName="\\My Documents\\html\\trailer.wmv"; Player.FileName="http://192.168.10.153:85/test.asx"; Player.Play(); } </script>
Some of the possible properties are commented out.
Change the FileName to either the local file name (which is commented out) *remembering* that you need to use back slashes for PPC file paths \ but in Javascript you need to *double* them \\ for each directory ! If you uncomment the local My Documents file path, of course, comment out the http:// file path, this was pointing to my local web server ;-)
You can swap out true for false to try the effect of turning off some of the control bars. The results might not be exactly as you expect, some bars like the slider depend on other bars being available.
HTH CHeers - Neil
><<<The workaround is to pass in params using javascript once the page >has loaded.>>> [quoted text clipped - 5 lines] >it...I'd like to follow along using just one program (PocketIE)...Any >help in this regard is very much appreciated...Thank you cherviralas - 22 Mar 2005 02:51 GMT My application requires me to embed the Windows Media Player in a web page or a stand alone Application where I can insert the WM Player.
I am using HP iPAQ H3615, this is a WiFi based Pocket PC phone(GPRS) with TI OMAP processor. It has preinstalled Windows Media Player 9 Series. I tried to use the HTML code to add the WM Player to a Web Page. However I couldn't display the WM Player on the web page. After going through comments in this Newsgroup, I tried to install the wmnall.exe on this PPC, however I couldn't install as this executable file is for Pocket PC 3.0, where as my Pocket PC is having Pocket PC 2003 OS.
Also, I found on the Microsoft website that OCX control called WMP v6.4 is need on the Pocket PC in order to embed the WM Player in the Pocket PC 2003. Do you know where I can find this OCX control.
I appreciate your help.
Warm Regards, Srinivas
> Well, each <PARAM NAME = "parameter name" VALUE = "parameter value"/> > has a corresponding Javascript value which you can use to set it, [quoted text clipped - 57 lines] > >it...I'd like to follow along using just one program (PocketIE)...Any > >help in this regard is very much appreciated...Thank you Arvind - 22 Mar 2005 07:24 GMT i ahve the setup for that.. mail me sothat i can send u as a mail atachment
 Signature ---------------------------------------------------------------------------- ------------------------- "eRiva Systems" - Where Technology Meets Life, Every Minute.
e-Mail : arvindr@erivasystems.com
Web Site: www.erivasystems.com
Yahoo Messenger : arvish27
> My application requires me to embed the Windows Media Player in a web page or > a stand alone Application where I can insert the WM Player. [quoted text clipped - 77 lines] > > >it...I'd like to follow along using just one program (PocketIE)...Any > > >help in this regard is very much appreciated...Thank you cherviralas - 22 Mar 2005 19:05 GMT Thanks Arvind.
I sent an e-mail to you so that you can send the setup as an e-mail attachment. I appreciate your help.
Best Regards, Srinivas Chervirala
> i ahve the setup for that.. mail me sothat i can send u as a mail atachment > [quoted text clipped - 87 lines] > > > >it...I'd like to follow along using just one program (PocketIE)...Any > > > >help in this regard is very much appreciated...Thank you Robert Burdick - 18 Oct 2007 22:25 GMT Can anyone show me how to get a sample like this to work with HTTP? I want to play files stored on a web server, and specifying a URL as the FileName for the player never works.
> Thanks Arvind. > [quoted text clipped - 95 lines] > > > > >it...I'd like to follow along using just one program (PocketIE)...Any > > > > >help in this regard is very much appreciated...Thank you
|
|
|