Question about customizing a web component

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ac

    #1

    Question about customizing a web component

    Hi, I have to customize a component (in this case Windows Media Player)
    so that a circular window is shown upon the player. That is, suppose you
    have a movie playing (in the ordinary rectangle window), I'd like to create
    some sort of mask which only allows to watch inside the circle (as if
    someone
    is viewing through a peephole or spyhole..)
    Is there any possible way to do this? This is targetted to WMP, but maybe it
    can be done with javascript?
    Any help from someone knowledgeable would be great, as I don't have any
    idea where to start from.

    TIA!



  • ac

    #2
    Re: Question about customizing a web component

    > Haven't tried it but it seems like you can just layer an image over the[color=blue]
    > Player in HTML. You'll need to specify windowlessVideo as true.[/color]

    Jim, thanks for your answer, but unfortunately it didn't work. In my html,
    I created a table with background desired, and set windowlessVideo as true.
    At the beginning, it looks fine, but as soon as the video starts, the image
    is put behind.
    BTW, I'm working with WMP 6.4 ... could this work with newer WMP versions?

    Just in case, I show you the html...(if you try it, please set Filename)



    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR " content="Micros oft FrontPage 4.0">
    <meta name="ProgId" content="FrontP age.Editor.Docu ment">
    <title>Test</title>
    </head>
    <body>
    <p align="center"> &nbsp;</p>
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" width="352" height="288"
    background="con trol.gif">
    <tr>
    <td width="352" height="288">
    <object classid="clsid: 22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    id="MediaPlayer " width="352" height="288">
    <param name="AudioStre am" value="-1">
    <param name="AutoSize" value="0">
    <param name="AutoStart " value="-1">
    <param name="Animation AtStart" value="0">
    <param name="AllowScan " value="-1">
    <param name="AllowChan geDisplaySize" value="-1">
    <param name="AutoRewin d" value="0">
    <param name="Balance" value="0">
    <param name="BaseURL" value>
    <param name="Buffering Time" value="5">
    <param name="Captionin gID" value>
    <param name="ClickToPl ay" value="-1">
    <param name="CursorTyp e" value="0">
    <param name="CurrentPo sition" value="-1">
    <param name="CurrentMa rker" value="0">
    <param name="DefaultFr ame" value>
    <param name="DisplayBa ckColor" value="0">
    <param name="DisplayFo reColor" value="16777215 ">
    <param name="DisplayMo de" value="0">
    <param name="DisplaySi ze" value="0">
    <param name="Enabled" value="0">
    <param name="EnableCon textMenu" value="-1">
    <param name="EnablePos itionControls" value="-1">
    <param name="EnableFul lScreenControls " value="0">
    <param name="EnableTra cker" value="-1">
    <param name="FileName" value>
    <param name="InvokeURL s" value="-1">
    <param name="Language" value="-1">
    <param name="Mute" value="0">
    <param name="PlayCount " value="1">
    <param name="PreviewMo de" value="0">
    <param name="Rate" value="1">
    <param name="SAMILang" value>
    <param name="SAMIStyle " value>
    <param name="SAMIFileN ame" value>
    <param name="Selection Start" value="-1">
    <param name="Selection End" value="-1">
    <param name="SendOpenS tateChangeEvent s" value="-1">
    <param name="SendWarni ngEvents" value="-1">
    <param name="SendError Events" value="-1">
    <param name="SendKeybo ardEvents" value="0">
    <param name="SendMouse ClickEvents" value="0">
    <param name="SendMouse MoveEvents" value="0">
    <param name="SendPlayS tateChangeEvent s" value="-1">
    <param name="ShowCapti oning" value="0">
    <param name="ShowContr ols" value="0">
    <param name="ShowAudio Controls" value="0">
    <param name="ShowDispl ay" value="0">
    <param name="ShowGotoB ar" value="0">
    <param name="ShowPosit ionControls" value="0">
    <param name="ShowStatu sBar" value="0">
    <param name="ShowTrack er" value="0">
    <param name="Transpare ntAtStart" value="-1">
    <param name="VideoBord erWidth" value="0">
    <param name="VideoBord erColor" value="0">
    <param name="VideoBord er3D" value="0">
    <param name="Volume" value="-560">
    <param name="Windowles sVideo" value="-1">
    </object>
    </td>
    </tr>
    </table>
    </center>
    </div>
    </body>
    </html>


    As long as I've been searching, it seems it's not possible to customize the
    player this way. The only option I can think of is creating a new activex
    control, using wmp as a base.... but it seems a little bit complicated (at
    least for me)

    Thanks in advance.




    Comment

    • p0wer

      #3
      Re: Question about customizing a web component

      U¿ytkownik "ac" <me@privacy.net > napisa³ w wiadomo¶ci
      news:bi4gtf$514 jb$1@ID-84876.news.uni-berlin.de...[color=blue]
      > Jim, thanks for your answer, but unfortunately it didn't work. In my html,
      > I created a table with background desired, and set windowlessVideo as[/color]
      true.[color=blue]
      > At the beginning, it looks fine, but as soon as the video starts, the[/color]
      image[color=blue]
      > is put behind.
      > BTW, I'm working with WMP 6.4 ... could this work with newer WMP versions?
      >
      > Just in case, I show you the html...(if you try it, please set Filename)
      >
      > (...cut...)
      >
      > As long as I've been searching, it seems it's not possible to customize[/color]
      the[color=blue]
      > player this way. The only option I can think of is creating a new activex
      > control, using wmp as a base.... but it seems a little bit complicated (at
      > least for me)[/color]

      Why are you trying to complicate your life? This is the case where layers
      come handy.
      You've been trying to do an impossible thing - masking player with image
      that in fact is placed underneath the player!
      Here's my layer proposal:

      <div style="position :absolute; top:20px; left:200px; z-index:0; width:384px,
      height:288px; margin:none">
      <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"

      codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.
      cab#Version=5,1 ,52,701"
      id="MediaPlayer "
      width="384"
      height="288">
      <param name="Windowles sVideo" value="1">
      (OTHER PARAMS HERE)
      </object>
      </div>
      <div style="position :absolute; top:20px; left:200px; z-index:1; width:384px,
      height:288px; margin:none">
      <img src="control.gi f" width="384" height="288">
      </div>

      Unfortunatelly, in this case you would have to specify a fixed location for
      the layers, thus probably rebuilding your entire site for all elements to
      have fixed sizes. Here's the table proposal:

      <table>
      <tr><td>
      <div style="z-index:0; width:384px, height:288px; margin:none">
      <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"

      codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.
      cab#Version=5,1 ,52,701"
      id="MediaPlayer "
      width="384"
      height="288">
      <param name="Windowles sVideo" value="1">
      (...)
      </object>
      </div>
      <div style="position :relative; top:-288; z-index:1; width:384px,
      height:288px; margin:none">
      <img src="control.gi f" width="384" height="288">
      </div>
      </td></tr>
      </table>

      How about that? Simple. Of course I've been testing it :)
      This code also ensures the player get supdated to the newest version
      (codebase). You can disable it as well if you do not like it.
      By the way, the option windowlessVideo does not cause the player to get
      transparent or something. If you set it to false, the video will overlay
      EVERYTHING that is in this place, even placed over the player. I suppose
      this is similar as turning video overlay off in full player.

      I hope I was helpful...

      --
      __ .: Radoslaw Loboda :. | Cool stuff !!!
      (oo) rloboda@bojko.k rakow.pl | --------------------
      / \/ \ | www.tigerhomes.org
      `V__V' | www.suncam.tv




      Comment

      • CAFxX

        #4
        Re: Question about customizing a web component

        you can't overlay anything over the WMP component (as you can't over a Flash
        or Director).
        you have two choices:
        1) encode your WMV with the mask already overlayed (every NLE will do that)
        2) *try* to embed your video in a flash animation on the bottom layer and
        place the mask on the top layer. i'm not sure this will work, tough...
        "p0wer" <p0wer@bojko_kr akow_pl> ha scritto nel messaggio
        news:3f45e587$1 @news.vogel.pl. ..[color=blue]
        > U¿ytkownik "ac" <me@privacy.net > napisa³ w wiadomo¶ci
        > news:bi4gtf$514 jb$1@ID-84876.news.uni-berlin.de...[color=green]
        > > Jim, thanks for your answer, but unfortunately it didn't work. In my[/color][/color]
        html,[color=blue][color=green]
        > > I created a table with background desired, and set windowlessVideo as[/color]
        > true.[color=green]
        > > At the beginning, it looks fine, but as soon as the video starts, the[/color]
        > image[color=green]
        > > is put behind.
        > > BTW, I'm working with WMP 6.4 ... could this work with newer WMP[/color][/color]
        versions?[color=blue][color=green]
        > >
        > > Just in case, I show you the html...(if you try it, please set Filename)
        > >
        > > (...cut...)
        > >
        > > As long as I've been searching, it seems it's not possible to customize[/color]
        > the[color=green]
        > > player this way. The only option I can think of is creating a new[/color][/color]
        activex[color=blue][color=green]
        > > control, using wmp as a base.... but it seems a little bit complicated[/color][/color]
        (at[color=blue][color=green]
        > > least for me)[/color]
        >
        > Why are you trying to complicate your life? This is the case where layers
        > come handy.
        > You've been trying to do an impossible thing - masking player with image
        > that in fact is placed underneath the player!
        > Here's my layer proposal:
        >
        > <div style="position :absolute; top:20px; left:200px; z-index:0;[/color]
        width:384px,[color=blue]
        > height:288px; margin:none">
        > <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"
        >
        >[/color]
        codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.[color=blue]
        > cab#Version=5,1 ,52,701"
        > id="MediaPlayer "
        > width="384"
        > height="288">
        > <param name="Windowles sVideo" value="1">
        > (OTHER PARAMS HERE)
        > </object>
        > </div>
        > <div style="position :absolute; top:20px; left:200px; z-index:1;[/color]
        width:384px,[color=blue]
        > height:288px; margin:none">
        > <img src="control.gi f" width="384" height="288">
        > </div>
        >
        > Unfortunatelly, in this case you would have to specify a fixed location[/color]
        for[color=blue]
        > the layers, thus probably rebuilding your entire site for all elements to
        > have fixed sizes. Here's the table proposal:
        >
        > <table>
        > <tr><td>
        > <div style="z-index:0; width:384px, height:288px; margin:none">
        > <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"
        >
        >[/color]
        codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.[color=blue]
        > cab#Version=5,1 ,52,701"
        > id="MediaPlayer "
        > width="384"
        > height="288">
        > <param name="Windowles sVideo" value="1">
        > (...)
        > </object>
        > </div>
        > <div style="position :relative; top:-288; z-index:1; width:384px,
        > height:288px; margin:none">
        > <img src="control.gi f" width="384" height="288">
        > </div>
        > </td></tr>
        > </table>
        >
        > How about that? Simple. Of course I've been testing it :)
        > This code also ensures the player get supdated to the newest version
        > (codebase). You can disable it as well if you do not like it.
        > By the way, the option windowlessVideo does not cause the player to get
        > transparent or something. If you set it to false, the video will overlay
        > EVERYTHING that is in this place, even placed over the player. I suppose
        > this is similar as turning video overlay off in full player.
        >
        > I hope I was helpful...
        >
        > --
        > __ .: Radoslaw Loboda :. | Cool stuff !!!
        > (oo) rloboda@bojko.k rakow.pl | --------------------
        > / \/ \ | www.tigerhomes.org
        > `V__V' | www.suncam.tv
        >
        >
        >
        >[/color]


        Comment

        • ac

          #5
          Re: Question about customizing a web component

          > Why are you trying to complicate your life? This is the case where layers[color=blue]
          > come handy.[/color]

          I complicate because I had no idea about layers :-) Didn't know they even
          existed! (I'm quite newbie to all this)
          [color=blue]
          > You've been trying to do an impossible thing - masking player with image
          > that in fact is placed underneath the player![/color]

          Exactly! and I must tell your solution is wonderful, and helped me a lot
          to go in the right direction. Thank you very much.

          Although I had a little problem with your examples:

          This one works ok, I put some comments to see if they're
          typos or not...
          [color=blue]
          > Here's my layer proposal:
          >
          > <div style="position :absolute; top:20px; left:200px; z-index:0;[/color]
          width:384px,

          width of the component is 352... I changed all occurrences
          [color=blue]
          > height:288px; margin:none">
          > <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"
          >
          >[/color]
          codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.[color=blue]
          > cab#Version=5,1 ,52,701"[/color]

          Yes, I avoid this because we stick to wmp 6.4 only... (don't ask why :-))
          [color=blue]
          > id="MediaPlayer "
          > width="384"
          > height="288">
          > <param name="Windowles sVideo" value="1">[/color]

          Maybe you mean "-1" ?
          [color=blue]
          > (OTHER PARAMS HERE)
          > </object>
          > </div>
          > <div style="position :absolute; top:20px; left:200px; z-index:1;[/color]
          width:384px,[color=blue]
          > height:288px; margin:none">
          > <img src="control.gi f" width="384" height="288">
          > </div>
          >
          > Unfortunatelly, in this case you would have to specify a fixed location[/color]
          for[color=blue]
          > the layers, thus probably rebuilding your entire site for all elements to
          > have fixed sizes. Here's the table proposal:[/color]

          OK, as you say, this one has the problem of being absolute... but it works
          anyway...


          Unfortunately this one didn't... the problem I'm having is that I get
          the table size doubled...as if it were taking account of the image height...
          [color=blue]
          > <table>
          > <tr><td>
          > <div style="z-index:0; width:384px, height:288px; margin:none">
          > <object classid="clsid: 22D6f312-B0F6-11D0-94AB-0080C74C7E95"
          >
          >[/color]
          codebase="http://activex.microso ft.com/activex/controls/mplayer/en/nsmp2inf.[color=blue]
          > cab#Version=5,1 ,52,701"
          > id="MediaPlayer "
          > width="384"
          > height="288">
          > <param name="Windowles sVideo" value="1">
          > (...)
          > </object>
          > </div>
          > <div style="position :relative; top:-288; z-index:1; width:384px,
          > height:288px; margin:none">
          > <img src="control.gi f" width="384" height="288">
          > </div>
          > </td></tr>
          > </table>[/color]

          OK, did that but the only problem I'm having is that. Except for that,
          everything works great.
          [color=blue]
          > I hope I was helpful...[/color]

          Again, million thanks for your valuable help!

          Just in case, this is the new html...

          <html>
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
          <meta name="GENERATOR " content="Micros oft FrontPage 4.0">
          <meta name="ProgId" content="FrontP age.Editor.Docu ment">
          <title>Test</title>
          </head>
          <body>
          <p align="center"> &nbsp;</p>
          <div align="center">
          <center>
          <table border="1" cellpadding="0" cellspacing="0" >
          <tr>
          <td>
          <div style="z-index:0; width:352px, height:288px; margin:none">
          <object classid="clsid: 22D6F312-B0F6-11D0-94AB-0080C74C7E95"
          id="MediaPlayer " width="352" height="288">
          <param name="AudioStre am" value="-1">
          <param name="AutoSize" value="0">
          <param name="AutoStart " value="-1">
          <param name="Animation AtStart" value="0">
          <param name="AllowScan " value="-1">
          <param name="AllowChan geDisplaySize" value="-1">
          <param name="AutoRewin d" value="0">
          <param name="Balance" value="0">
          <param name="BaseURL" value>
          <param name="Buffering Time" value="5">
          <param name="Captionin gID" value>
          <param name="ClickToPl ay" value="-1">
          <param name="CursorTyp e" value="0">
          <param name="CurrentPo sition" value="-1">
          <param name="CurrentMa rker" value="0">
          <param name="DefaultFr ame" value>
          <param name="DisplayBa ckColor" value="0">
          <param name="DisplayFo reColor" value="16777215 ">
          <param name="DisplayMo de" value="0">
          <param name="DisplaySi ze" value="0">
          <param name="Enabled" value="0">
          <param name="EnableCon textMenu" value="-1">
          <param name="EnablePos itionControls" value="-1">
          <param name="EnableFul lScreenControls " value="0">
          <param name="EnableTra cker" value="-1">
          <param name="Filename" >
          <param name="InvokeURL s" value="-1">
          <param name="Language" value="-1">
          <param name="Mute" value="0">
          <param name="PlayCount " value="1">
          <param name="PreviewMo de" value="0">
          <param name="Rate" value="1">
          <param name="SAMILang" value>
          <param name="SAMIStyle " value>
          <param name="SAMIFileN ame" value>
          <param name="Selection Start" value="-1">
          <param name="Selection End" value="-1">
          <param name="SendOpenS tateChangeEvent s" value="-1">
          <param name="SendWarni ngEvents" value="-1">
          <param name="SendError Events" value="-1">
          <param name="SendKeybo ardEvents" value="0">
          <param name="SendMouse ClickEvents" value="0">
          <param name="SendMouse MoveEvents" value="0">
          <param name="SendPlayS tateChangeEvent s" value="-1">
          <param name="ShowCapti oning" value="0">
          <param name="ShowContr ols" value="0">
          <param name="ShowAudio Controls" value="0">
          <param name="ShowDispl ay" value="0">
          <param name="ShowGotoB ar" value="0">
          <param name="ShowPosit ionControls" value="0">
          <param name="ShowStatu sBar" value="0">
          <param name="ShowTrack er" value="0">
          <param name="Transpare ntAtStart" value="-1">
          <param name="VideoBord erWidth" value="0">
          <param name="VideoBord erColor" value="0">
          <param name="VideoBord er3D" value="0">
          <param name="Volume" value="-560">
          <param name="Windowles sVideo" value="-1">
          </object>
          </div>
          <div style="position :relative; top:-288; z-index:1; width:352px,
          height:288px; margin:none">
          <img src="control.gi f" width="352" height="288">
          </div>
          </td>
          </tr>
          </table>
          </center>
          </div>
          </body>
          </html>



          ac.-


          Comment

          Working...