Delphi Insert HTML Code Player

Source: Internet
Author: User

How Delphi inserts Html/java script code in WebBrowser
Assign the following code to 1 notebooks to save, then save as xxx.htm to see the effect
implementing features with Pastehtml
of events

    1. Windows Media Player mp3 mp4
    2. Windows Real Player
    3. Flash Player
    4. Mid background music
    5. Image

      The method
( (WebBrowser1.Document as IHTMLDocument2).selection.createRange as IHtmlTxtRange).pasteHTML(Memo1.Text);注意 划删除线的表示使用这个函数无效果

Play mid background music SRC is a MIDI file name, Loop=-1 for infinite playback, 1 for once, 2 for two times ...

<HTML><HEAD>
<bgsound src=C:\1.mid loop=-1</HEAD>
<body></body></HTML>

Windows Media Player supports playback *.mp3 *.avi *.mp4 *.mov *.wmv *.wav *.mid *.wma *.m3u *.mpeg *.csf *.asf *.3gp

<object style="WIDTH: 480px; HEIGHT: 360px" ID="nsPlayer" classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A"> 
<PARAM NAME="FileName" VALUE=C:\1.mp3 /> 
<PARAM NAME="AutoStart" VALUE="1" /> 
<PARAM NAME="ShowDisplay" VALUE="0" /> 
</OBJECT>

Windows Media Player support format *.mp4 *.avi not supported. mp3

</ STYLE ;
</ HEAD >< BODY ;
< DIV ;
     < EMBED  
         Width = 400
         Height = $  
         type =application/x-oleobject 
          codeBase =http://activex.microsoft.com/activex/ Controls / mplayer/en/nsmp2inf.cab#version=5,1,52,701  
         SRC = File://C:/1.avi  
        autostart= " False "
        flename=" MP ";
    </ EMBED ></ EMBED ></ EMBED ;
</ DIV ></ BODY ;
</ HTML ;


//real player Supported formats *.rm *.avi
<EMBED 
height=360
width=480 
src="c:\1.avi"
type=audio/x-pn-realaudio-plugin 
autostart="False" 
controls="ControlPanel">
</embed>



//real player Supported formats *.rm *.avi
</HEAD><BODY>
<EMBED 
    width=480
    height=360 
    type=audio/x-pn-realaudio-plugin 
    src="C:\1.avi"
    autostart="true" 
    console="cons" 
    controls="ImageWindow">
</EMBED>
</BODY></HTML>


Insert Flash Player < Object ClassID= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width= "480" Height= "360" title= "Saxs" >
< param name= "movie" value= "c:\1.swf"/>
< param name= "Play" value= "false"/>
< param name= "Quality" value= "High"/>
< param name= "allowScriptAccess" value= "Always"/>
< param name= "allowFullScreen" value= "true"/>
</ Object>













From for notes (Wiz)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.