'scale' property in embed tag

Help
Peter Kyme
2004-12-16
2013-05-13
  • Peter Kyme
    Peter Kyme
    2004-12-16

    Would it be possible to add support for the scale property in embed tags? An explanation of the property is given here:

    http://www.apple.com/quicktime/authoring/embed2.html

    This is particularly useful for showing large movies at half-size, for example.

     
    • Peter Kyme
      Peter Kyme
      2004-12-16

      After further investigation, I can see that support is there - it just wasn't working for me.

      In the end it turns out the version of mplayer I'm using (1.0pre5-3.2.2) doesn't support the -xy option for -vo x11, although it does support the single -x & -y options.

      Another question - how do I use the javascript methods detailed in DOCS/tech/javascript.txt.

      For example, if I have an embedded movie clip, how would I load a new clip into that plugin instance using javascript and the open() method?

       
      • Peter Kyme
        Peter Kyme
        2004-12-17

        Ok, scratch that - it's Open() not open(). D'oh...

        Another question, when I do javascript Open() on a file:// style url, nothing seems to happen, yet I'm ok to use such urls as the src="" when I embed the first movie.

        Am I doing something wrong?

         
        • Kevin DeKorte
          Kevin DeKorte
          2004-12-17

          Here is some HTML that I use:
          ******** BEGIN ***************
          <HTML>
          <HEAD>
          <TITLE>Simple Plug-in Test</TITLE>
          </HEAD>
          <BODY>

          <center>
          <h1> XPConnect Scriptable Sample Plug-in </h1>
          </center>

          This page contains a testcase which demonstrates the work of scriptable
          plug-in with Mozilla. This example plug-in has no native GUI and does not
          draw anything in the plugin window. Clicking on the button will result in callin
          g
          native plugin method from JavaScript. Show Version will instruct the plug-in
          to retrieve the Mozilla user agent string and return it to JavaScript to show
          in the alert box.

          <br><br>

          <center>

          <embed onMediaComplete="NewFile();" type="application/x-mplayer2" width=500 heig
          ht=400 autostart=0 filename="file:///Movies/duality.divx"><br>

          <script>
          var embed = document.embeds[0];

          function complete()
          {
            alert("Media Complete");
          }

          function Play()
          {
            embed.Play();
          }

          function CPlay()
          {
            embed.controls.play();
          }

          function CPause()
          {
            embed.controls.pause();
          }

          function CStop()
          {
            embed.controls.stop();
          }

          function Pause()
          {
            embed.Pause();
          }

          function DoPlay()
          {
            embed.DoPlay();
          }

          function DoPause()
          {
            embed.DoPause();
          }

          function Stop()
          {
            embed.Stop();
          }

          function Quit()
          {
            embed.quit();
          }

          function FastForward()
          {
            embed.FastForward();
          }

          function FastReverse()
          {
            embed.FastReverse();
          }

          function PlayState()
          {
             alert(embed.playState);
          }

          function OrigFile()
          {
                  embed.filename = "09_Holiday.mp3";
                  embed.play();
          }

          function NewFile()
          {
                  embed.filename = "sexy.mpg";
                  embed.Play();
          }

          function File()
          {
                  alert(embed.filename);
          }

          function gTime()
          {
                  alert(embed.getTime());
          }
          function gDuration()
          {
                  alert(embed.getDuration());
          }
          function gPercent()
          {
                  alert(embed.getPercent());
          }

          function FS()
          {
                  embed.fullscreen = true;
          }

          function FSOff()
          {
                  embed.fullscreen = false;
          }

          function ControlsOn()
          {
                  embed.ShowControls = true;
          }

          function ControlsOff()
          {
                  embed.ShowControls = false;
          }

          </script>

          <br>
          <form name="formname">
          <input type=button value="Play" onclick='Play()'>
          <input type=button value="ControlsPlay" onclick='CPlay()'>
          <input type=button value="ControlsPause" onclick='CPause()'>
          <input type=button value="ControlsStop" onclick='CStop()'>
          <input type=button value="DoPlay" onclick='DoPlay()'>
          <input type=button value="Pause" onclick='Pause()'>
          <input type=button value="DoPause" onclick='DoPause()'>
          <input type=button value="Stop" onclick='Stop()'>
          <input type=button value="Quit" onclick='Quit()'>
          <br>
          <input type=button value="FF" onclick='FastForward()'>
          <input type=button value="Rew" onclick='FastReverse()'>
          <input type=button value="State" onclick='PlayState()'>
          <input type=button value="Orginal File" onclick='OrigFile()'>
          <input type=button value="New File" onclick='NewFile()'>
          <input type=button value="Filename" onclick='File()'>
          <input type=button value="Time" onclick='gTime()'>
          <input type=button value="Duration" onclick='gDuration()'>
          <input type=button value="Percent" onclick='gPercent()'>
          <input type=button value="FS" onclick='FS()'>
          <input type=button value="Window" onclick='FSOff()'>
          <input type=button value="Controls ON" onclick='ControlsOn()'>
          <input type=button value="Controls OFF" onclick='ControlsOff()'>

          </form>

          </center>

          </BODY>
          </HTML>

           
          • Peter Kyme
            Peter Kyme
            2004-12-17

            Thanks, this will be useful.

             
          • Peter Kyme
            Peter Kyme
            2004-12-20

            Incidentally, it would be useful if you could support aliases where appropriate for the javascript commands supported by the quicktime plugin. A list of some of them is given here:

            http://developer.apple.com/documentation/QuickTime/REF/QT41_HTML/QT41WhatsNew-74.html

             
        • Peter Kyme
          Peter Kyme
          2004-12-17

          On further investigation it appears that the NewStream Callback wasn't occuring when the 'file://' style path went through the fullyQualifyURL function. I commented out the section beginning:

                  if (strncasecmp(localitem, "file://", 7) == 0) {

          and my problem using Open() went away. Not sure what else this will break...