Re: Opening in a web site



Sweet solution - thanks Neil!

Can I bother you with one more advancement on this scenario?

Is there a way to create an .asx file (or .wvx) that has multiple <entry>
sections (one for each chapter in the video with start and duration times
defined for that chapter) and then from the hyperlink on my web page, call
the specific <entry> that I want that particular hyperlink to point to?

That way I would have one .asx file to maintain, and I could also have a
PLAY ALL hyperlink that would simply start with the first <entry> tag and
play the entire video, and Windows Media Player users would see the TOC of
chapters on the right side of their Windows Media Player window that they
could click on to jump around in the video.

Thoughts?


"Neil Smith [MVP Digital Media]" wrote:

> Doing this via javascript is actually quite awkward (I can provide a
> link if it'll help). The easiest way is to create a series of ASX
> files (playlists) for your TOC, and provide a link to each one in the
> web page.
>
> A typical ASX for this would include the STARTTIME parameter, so
>
> <ASX VERSION="3.0">
> <ENTRY>
> <TITLE>Clip 1 section 2</TITLE>
> <REF
> HREF="http://path.to.your.webserver/videoclip1.wmv"; />
> <STARTTIME value="00:00:01:30.00" />
> </ENTRY>
> </ASX>
>
> Of course, clip1section1 wouldn't need the starttime value, it would
> begin at 0:00:00. The clip above would buffer until the player reached
> 1 minute 30 seconds into the clip, and begin playing. If it came off a
> media server rather than a web server, it would only buffer a small
> amount of time because the media server allows you to random access
> within the file.
>
> Saved as clip1section2.asx, you'd link to it like this
>
> <a href="http://path.to.your.webserver/clip1section2.asx";>Click tor
> Video</a>
>
> Which would open the stand alone player. If you wanted to link that to
> your embedded player, you'd have a small piece of javascript instead :
>
>
> <script language="javascript1.2" type="text/javascript">
> function playClip(clipURL) {
> player=document.getElementById("MediaPlayer");
> if (player.controls != undefined) {
> player.url=clipURL;
> player.controls.play();
> } else {
> location.href=clipURL;
> }
> }
> </script>
>
> Then you'd alter your link syntax to run the javascript :
>
> <a href="http://path.to.your.webserver/clip1section2.asx"; onclick="
> playClip('http://path.to.your.webserver/clip1section2.asx'); return
> false">Click tor Video</a>
>
> We "return false" here to cancel the browser's default action of
> navigating to (opening) the href of this link - which would stop the
> player playing, because the page would be about to unload !
>
> HTH
> Cheers - Neil
>
> On Sat, 14 Jan 2006 18:43:02 -0800, "PierceIt"
> <PierceIt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> >This was ahelpful post to me to. I have another question: using the code snip
> >you provided in this thread for embedding a media player in aweb page, how
> >might one go about creating a simple table of contents for a .wmv video so
> >users can click a link and jump to specific locations in the video?
> >
> >thanks in advance for any help or direction
> >
> >"Neil Smith [MVP Digital Media]" wrote:
> >
> >> On Thu, 21 Apr 2005 11:18:02 -0700, "Mary"
> >> <Mary@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >> >Thanks for having a place like this as a resource!! My question is how to
> >> >get Windows Media Player to open up from a web site hyperlink to play a WMF
> >> >with limited resources of the player. In other words, just a basic window
> >> >with only the X in the upper right hand corner of the window to shut down the
> >> >file. If this is possible, is there a way to control the size and location of the
> >> >window also?
> >>
> >> You mean to open a small window, within which is a copy of media
> >> player ? Sure. Just consider how you'd create a sized popup window -
> >> these resources will help, a good basic javascript window opening
> >> tutorial and a FAQ site :
> >>
> >> http://www.htmlgoodies.com/primers/jsp/article.php/3478231
> >> http://www.irt.org/script/window.htm
> >>
> >> > Maybe I should be asking this question in the FrontPage forum.
> >> >Let me know if I am off-base. Thanks for the help.
> >>
> >> Suppose your window size is 200 wide and 250 high : That is, the area
> >> to display the web page inside the window, not the outside of the
> >> window including title, status bar etc which might be more like 215 x
> >> 270 pixels.
> >>
> >> The next thing you need to do, once you have got a window of the
> >> desired dimensions to open, is to have a web page loaded in it that
> >> contains a "embedded" (in-page) copy of media player. This code
> >> manages that :
> >>
> >> <html>
> >> <head>
> >> <title>This is my popup media player</title>
> >> </head>
> >> <body>
> >> <object id="MediaPlayer"
> >> classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
> >> type="video/x-ms-wma" width="200" height="250">
> >> <param name="autostart" value="true" />
> >> <param name="stretchtofit" value="true" />
> >> <param name="url" value="my_video.wmv" />
> >> <param name="uimode" value="mini" />
> >> <param name="windowlessvideo" value="true" />
> >> <!--[if !IE]> <-->
> >> <object id="MediaPlayer2" type="video/x-ms-wma" width="200"
> >> height="250" data="my_video.wmv">
> >> <param name="filename" value="my_video.wmv" />
> >> <param name="showcontrols" value="0" />
> >> <param name="animationatstart" value="0" />
> >> <param name="transparentatstart" value="0" />
> >> <param name="showaudiocontrols" value="1" />
> >> <param name="showtracker" value="0" />
> >> <param name="showdisplay" value="0" />
> >> <param name="showstatusbar" value="1" />
> >> <param name="autostart" value="1" />
> >> </object>
> >> <!--> <![endif]-->
> >> </object>
> >> </body>
> >> </html>
> >>
> >> The code above will create a media player (including *some* but not
> >> all transport controls) of 200x250 pixels size, and load a file from
> >> the same directory called my_video.wmv.
> >>
> >> Other advice : There are a *lot* of old tutorials out there for doing
> >> this embedding code. Many of them are out of date, and don't work as
> >> well with the new players versions 7,8,9,10 released since version 6.4
> >> (from 1999-2000).
> >>
> >> You can tell these codes apart by looking at the classid value of the
> >> <object /> tag. If it's the same as above, then you can cut+paste some
> >> code and it should work fine with the newer embedding code above.
> >>
> >> If you see classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 then
> >> it's using the older style embedding code. At some point that will
> >> stop working as newer players are released, so stick to the newer
> >> classid above.
> >>
> >> Cheers - Neil
> >>
>
>
.



Relevant Pages

  • Re: Opening in a web site
    ... Which would open the stand alone player. ... you'd have a small piece of javascript instead: ... In other words, just a basic window ... >> code and it should work fine with the newer embedding code above. ...
    (microsoft.public.windowsmedia)
  • Re: One player window for auto start video and click on demand vid
    ... standlone player in case of failure. ... If I have a video set to auto start and I would like to add on demand ... window as the auto start video window? ...
    (microsoft.public.windowsmedia.sdk)
  • Re: WMP browser control doesnt work
    ... that player 6.4 has completely separate codecs than the ... the codec package for the 6.4 player, to let it play WMV9 video. ... in the embedded window, though it will if started in a detached window. ...
    (microsoft.public.windowsmedia.player.web)
  • Re: One last attempt: corrupted video film
    ... I will try an InvalidateRect and UpdateWindow on the video window. ... >> One video we play with this Player seems to be partially corrupted. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Change Default Window Size When WMP10 Launches
    ... See http://zachd.com/pss/pss.html for some helpful WMP info. ... Is it the video or the player with the video inside the player window ...
    (microsoft.public.multimedia.windows.mediaplayer)