Embed a VLC video player in a web page. The default browser is IE. To modify some param attribute values of the player, the method is as follows:
The first is to embed the player software VLC into html (part of the code is as follows):
<object center="center" width="900" height="600" id='vlc1_IE' events="True" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"> <!-- <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" center="center" width="900" height="600" id="vlc"> </embed> <param name="src" value="rtsp://218.204.223.237:554/live/1/67A7572844E51A64/f68g2mj7wjua3la7.sdp"/> --> <param name="Show Display " value="True" /> <param name=" AutoPlay " value="true" /> </object>
Description: If it isFirefox or 360 browser will remove the comment symbols. In order to add property values you can set a Button event. Use the Button event to call the following method:
function myFunction() { var x = document .createElement("param"); x.setAttribute("name","src"); x.setAttribute("value","rtsp://218.204.223.237:554/live/1/67A7572844E51A64/f68g2mj7wjua3la7.sdp"); document.getElementById("vlc1_IE").appendChild(x); }
##At the same time : The setting of the Button event is as follows:
<input type="button" style="width:26px; height:24px; background-image:url('./icon/0.png');" onclick="myFunction()" value="Bt">
In this way, you can control the addition or modification of certain param attributes through the button, but this method is still relatively clumsy.
The above is the detailed content of Modify the value of the param attribute in html (video player). For more information, please follow other related articles on the PHP Chinese website!