martin: videos in html einbinden, individuelle buttons

ich möchte videos (avi, mpg, whatever) in html-dateien einbinden. dcas ganze soll letztenendes wie ein fernseher mit play-, stop- und anderen knöpfen aussehen. ich weiss, man könnte das sicher auch in flash machen, aber ich muss das notgedrungenerweise (zuwenig flashkenntnisse, zuwenig zeit) aus grafiken zusammenfrickeln. es soll letztenendes auch nicht in's netz, sondern eine offline-präsentation werden.

was mich nun aber interessiert ist, wie man die eingebundenen videos (mit welchem befehl ausser embed kann man das noch?), mit individuellen buttons ansteuert, also abspielt, stoppt etc.

  1. Hallo!

    Schau mal hier, ob das was für Dich ist:

    http://selfhtml.teamone.de/html/multimedia/objekte.htm#active_x

    Achim

    1. Hallo!

      Schau mal hier, ob das was für Dich ist:

      http://selfhtml.teamone.de/html/multimedia/objekte.htm#active_x

      Achim

      hmm, nee, hilft mir jetzt leider nicht wirklich weiter

  2. Moin, moin!

    Wenn es um eine offline-Präsentation geht, ist es ja wahrscheinlich möglich, sich auf den Internet Explorer und dazu passend den Media Player 7.1 zu beschränken. Da ich vor kurzem ein ähnliches Problem hatte, habe ich mir aus den Tiefen der Microsoft-Website (leider habe ich die URL nicht mehr) mal einige Infos über Scripting gezogen, die ich hier mal im englischen Original einfüge:

    Embedding Windows Media Player
    You can build Windows Media Player into a Web page by embedding it. The first advantage of embedding is that you have complete control over the look of the player and how it functions-in other words, the entire user experience. You can create a player that works with the design of a page, and you can expose only those functions that are appropriate.
    You can, for example, expose only two buttons-play and stop-and set the player to play only one file.
    Das entspricht wohl deiner Frage; ich denke, daß es kein Problem ist, selbstgebaute Grafiken mit einem onclick-event zu versehen, und damit die entsprechende Funktion aufzurufen...
    Note: Embedding Windows Media Player in a Web page gives you complete control of the user experience within a browser. If you want control of the user experience outside the browser, you can create custom player skins. For more information, see Creating Custom Skins for the New Windows Media Player 7.

    Using the Version 7 Control
    To embed Windows Media Player, you add an OBJECT element for the Windows Media Player ActiveX® control.The following HTML example opens the Windows Media Player 7 control with a set size of 320 by 240 pixels:

    <BODY>
    <OBJECT ID="Player" width="320" height="240"
      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
    </OBJECT>
    </BODY>

    The CLASSID number is unique to version 7 of the Windows Media Player control. If an end user has an older version, the player will not open. Version 7 has a unique ID because the new player has an improved scripting model that is not compatible with older versions.

    Die CLSID würde ich einfach per cut and paste übernehmen

    Adding PARAM Elements
    With Windows Media Player embedded in your Web page, you can add script that controls the player's look and functionality. The PARAM element enables you to specify certain player properties when the page opens. You can specify properties such as the name of the file or URL that you want the player to open, and how you want the player to appear.

    The following version 7 script example uses the PARAM element to set the AUTOSTART property of the player to TRUE, and the URL property to the location of a Windows Media metafile:

    <HTML>
    <HEAD>
    <TITLE>Embedded Windows Media Player 7 Control</TITLE>
    </HEAD>
    <BODY>
    <OBJECT ID="Player" width="320" height="240"
      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
      <PARAM name="autoStart" value="True">
      <PARAM name="URL" value="http://WebServer/MyFile.wvx">
    </OBJECT>
    </BODY>
    </HTML>

    With AUTOSTART enabled, the file or stream specified by the URL plays automatically as soon as the player control opens.

    Bei einer lokalen Präsentation würde ich den Film in das gleiche Verzeichnis hauen wie die aufrufende HTML-Datei, da es sonst irgendwie Probleme bibt für den Media-Player, den Film zu finden!!!

    Adding Scripting
    With the Windows Media Player control embedded and PARAM properties set, you can add script that controls player functions. The following script adds two input buttons:

    <INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
    <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">

    The buttons work with the following Microsoft JScript® script to start and stop the player:

    <SCRIPT>
    <!--
       function StartMeUp ()
       {
           Player.URL = "http://WebServer/MyFile.wvx";
       }

    function ShutMeDown ()
       {
           Player.controls.stop();
       }
    -->
    </SCRIPT>

    Statt <input....> müßte das Ganze auch mit <img....> funktionieren

    The following complete HTML script embeds the Windows Media Player 7 control, sets the URL PARAM, embeds two buttons, and contains scripting to make the buttons work. It also contains script to pop up a message box if an end user does not have the version 7 player installed.
    ...
    Folgenden Parameter würde ich einfügen:
    <PARAM name="uiMode" value="none">
    With this property set to none, the player opens without any controls.
    Mit uiMode hast du ein nacktes Fenster, in dem der Film läuft, ohne irgendwelche Bedienelemente des Media Players (außer Deinen selbstgebastelten).
    Du kannst das Ganze übrigens auch in einen <div> verpacken und diesen über CSS positionieren

    PARAM Tags
    Windows Media Player uses the PARAM element to define specific startup conditions for the control. The PARAM element is embedded inside the OBJECT element.
    You can have as many PARAM tags in an OBJECT element as you want. PARAM has two attributes, name and value. Both attributes must be set.

    The following values are supported for use with the name attribute of the PARAM element.

    autoStart
    enableContextMenu
    fullScreen
    uiMode
    URL
    volume

    Für echte Profis gibt es noch viel mehr Parameter

    The following OBJECT tag attributes are required:
    ID

    You can choose any name you want, as long as it is a name that is not already used by HTML, HTML extensions, or the scripting language you are using.
    CLASSID

    A very large hexidecimal number that is unique to the control. Only one control has this number and it is the Windows Media Player ActiveX control. Previous versions of the Windows Media Player control had a different CLASSID.

    Adding a User Interface
    HTML allows a vast wealth of user interface elements, allowing the user to interact with your Web page by clicking, pressing keys, and other user actions. Adding a few INPUT buttons is the easiest way to provide a quick user interface.

    Adding Scripting Code
    Scripting code adds interactivity to your page. Scripting code can respond to events, call methods, and change run-time properties. Extended scripts are enclosed in a SCRIPT tag set. The SCRIPT tag tells the browser where your scripting code is and identifies the scripting language. If you do not identify a language, the default language will be Microsoft JScript.

    About the Controls Object
    This object governs the transport of the media content through the control, by using methods such as Play and Stop. It is accessed only through the Controls property of the Player object. The Controls property returns the Controls object. You can only access the properties of the Controls object after you have created it. For example, to use the Play method, you must use the following code:

    player.controls.play()

    Embedding the Player in the Body Section of a Web Page
    The Windows Media Player ActiveX object is embedded in a Web page using the OBJECT element. Unlike earlier versions, the OBJECT element that defines Windows Media Player must be placed in the BODY section of a Web page; that is, between the <BODY> and </BODY> tags. Placing the Windows Media Player ActiveX object in the HEAD section of a Web page can produce unexpected results.

    If you put the Windows Media Player ActiveX control in the BODY section of a Web page, the control user interface will be displayed. If you do not want it to be displayed, and wish to create your own user interface, set the height and width attributes of the OBJECT element to zero.

    Das ist wahrscheinlich mehr Information, als du wolltest, aber hoffentlich hilft es Dir weiter.

    Viel Erfolg
    Jochen

    1. das hört sich ja schonmal alles sehr gut und brauchbar an. danke dafür.

      nur bin ich skeptisch, ob sich jeder diese präsentation mit ie und wmplayer 7 anschaut, da diese präsentation auf cd gebrannt und zur erinnerung an diverse leute vergeben werden soll.

      zur not muss ich halt die dateien einfach so einbinden, dass die dann mit dem entsprechenden player im frame angeschaut werden können.

      aber trotzdem vielen dank!