473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MediaPlayer control through JS onload

When embedding a windows media player wmv video into a Web page like
at http://www.marcfest.com/temp/embedvideotest.html, I want the first
or so frame of the video to show on loading of the page, before one
starts playing the video, rather than the black square currently
shown. How can I accomplish this? I thought of using Javascript to
tell Media Player to play the video for a fraction of a second after
the page is loaded and then pause so that an image is displayed but I
didn't succeed fiddling around with that. Any solution that will work
will be fine.

Thank you.

Marc

Mar 10 '06 #1
1 3805

ma******@gmail.com wrote:
When embedding a windows media player wmv video into a Web page like
at http://www.marcfest.com/temp/embedvideotest.html, I want the first
or so frame of the video to show on loading of the page, before one
starts playing the video, rather than the black square currently
shown. How can I accomplish this? I thought of using Javascript to
tell Media Player to play the video for a fraction of a second after
the page is loaded and then pause so that an image is displayed but I
didn't succeed fiddling around with that. Any solution that will work
will be fine.


I have never done this. One option is to screen capture the start of
the video as a jpg and place this on the page with absolute
positioning. Then the movie is positioned on top of this. Then when you
start the movie, you switch the visibility of the jpg to hidden using
script. You can use a div as a container for the movie and jpg.

There may be another way that is more direct, but you will have to
investigate this at Microsoft. At least for an ActiveX wmp object,
there is a parameter "defaultFrame" that can be used. I do not know if
this will do what you want, but it is the best lead I have. I do not
know if it can be forced to work on browsers that do not support
ActiveX wmp objects. I had the information about "defaultFrame" on my
computer, and it likely came from Microsoft's developer sites. However
I do not have time to search that maze just now to give you the URL. I
will just quote what I have below.

__________________________________________________ ____________

Settings.defaultFrame

The defaultFrame property specifies or retrieves the name of the frame
used to display a URL that is received in a ScriptCommand event.

Syntax

player.settings.defaultFrame

Possible Values

This property is a read/write String corresponding to the value of the
name attribute of the target FRAME element.

Remarks

If a target frame is specified in the ScriptCommand event itself, this
property is ignored.

This property is ignored when using the Netscape Navigator Java applet.
In Navigator, each URL script command received displays the URL in a
new browser window, regardless of the value of Settings.defaultFrame.

Windows Media Player 10 Mobile: This property is read only, and always
returns an empty string.

Requirements

Version: Windows Media Player version 7.0 or later.

Header: Defined in wmp.idl; include wmp.h.

Mar 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: juergen | last post by:
I've integrated more than one mediaplayer (axmplayer) in my application. I've tried a lot of settings and 'tricks' to avoid, that the winlogo appears, when not playing or starts playing. It works...
2
by: MLH | last post by:
The A97 set of controls has one at the end entitled "More Controls". Clicking it produces a host of ActiveX and OCX controls that can be dropped onto a form just as easily as a textbox. One of...
0
by: DotNetMania | last post by:
hi.. i have some questions about media player article on codeproject website...... http://www.codeproject.com/cs/media/directshowmediaplayer.asp?df=100&forumid=4399&select=820191#xx793428xx ...
1
by: Richard Loupatty | last post by:
Does anyone know how to control windows mediaplayer? I would like to give the user the possibility to skip in the player by setting a new startposition. tia Richard
6
by: Sjaakie Helderhorst | last post by:
Hi, I've been fooling around (noob) with VB.NET and put together a remote-controlled Mediaplayer-based 'server'. Had some troubles configuring interop on Windows XP with VS.NET 2003, but...
2
by: Dick | last post by:
Hello, I've written a program that uses the Windows Mediaplayer. There are 2 files generated in my Bin folder: AxInterop.WMPLib.dll Interop.WMPLib.dll When running in the vb.net ide it...
0
by: Nonee | last post by:
Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. Anyway, I "published" the vb.net...
1
by: Stephen | last post by:
Here is my issue. I have a <asp:listbox control that is populated with movie titles and url for the media file from a database. No problem. No what I want is the OnSelectedIndexChanged event...
7
by: xhunter | last post by:
ok here is my problem, I am trying to change the source file of the mediplayer using javascript, my script works perfectly in "Internet Explorer", but no matter what I do, it doesn't work in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.