how to remove controls from embedded video?

2019-09-20 19:04发布

问题:

Is it actually impossible to remove the UI controls from this embedded video?
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_objectmplayer

<param showcontrols="false"> 
<param uiMode="invisible">

...showcontrols="false"...

does not hide the controls - contrary to natural english meaning of "show controls"

EDIT: --THE FOLLOWING WORKS & IS CROSS-BROWSER (until IE10)...
EDIT2: --BUT THE FOLLOWING ALSO SEEMS TO CAUSE NEVER-ENDING-SENDRESPONSE-STATUS WORKER PROCESSES (SEE https://stackoverflow.com/questions/16790199/iis7-5-wmv-requests-cause-many-workerprocesses-in-never-ending-sendresponse-stat)

<!--[if IE]>
    <object id="MediaPlayer" style="height:100%" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">

        <param name="filename" value="3d.wmv" />
        <param name="Showcontrols" value="false" />
        <param name="autoStart" value="True" />
        <param name="wmode" value="transparent" />
    </object>
    <![endif]-->

    <!--[if !IE]><!-->
    <object id="mediaplayer" type="application/x-ms-wmp" data="3d.wmv" width="100%" height="80%">
        <param name="src" value="3d.wmv" valuetype="ref" type="3d.wmv">

        <param name="autoStart" value="1">
        <param name="ShowControls" value="0">
        <param name="Showcontrols" value="false" />
        <param name="autoStart" value="True" />
        <param name="wmode" value="transparent" />
        <param name="ShowDisplay" value="0">
        <param name="ShowStatusBar" value="0">
        <param name="playcount" value="10">
        <param name="autoRewind" value="1">
        <param name="displaysize" value="0">
        <param name="stretchtofit" value="1">
        <param name="enableContextMenu" value="0">
        <param name="uiMode" value="none">
        <embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
    </object> 
    <!--<![endif]-->

回答1:

Taking your W3Schools example code -

<!DOCTYPE html>
<html>
<body>

<object width="100%" height="100%"
type="video/x-ms-asf" url="3d.wmv" data="3d.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="3d.wmv">
<param name="filename" value="3d.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">                              
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>

</body>
</html>

Change

<embed... showcontrols="true"...  

to

<embed... showcontrols="false"...


标签: html embed