Home > Web Front-end > HTML Tutorial > Modify the value of the param attribute in html (video player)

Modify the value of the param attribute in html (video player)

黄舟
Release: 2017-07-03 14:24:22
Original
2083 people have browsed it

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=&#39;vlc1_IE&#39; 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>
Copy after login


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);
}
Copy after login


##At the same time : The setting of the Button event is as follows:

<input type="button" style="width:26px; height:24px; background-image:url(&#39;./icon/0.png&#39;);" onclick="myFunction()" value="Bt">
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template