| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <HTML>
- <HEAD>
- <TITLE>
- EasyPlayer Plugin Example
- </TITLE>
- <script type="text/javascript">
-
-
-
- function config() {
- var obj = document.getElementById("EasyPlayerOcx");
-
- var cache = document.getElementById("cache").value;
- var playsound = document.getElementById("playsound").checked ? 1 : 0;
- var showtoscale = document.getElementById("showtoscale").checked ? 1 : 0;
- var showsatic = document.getElementById("showsatic").checked ? 1 : 0;
-
- obj.Config(cache, playsound, showtoscale, showsatic);
- obj.SetOSD(1, 255, 0, 0, 255, 100, 100, 1000, 150, "EasyPlayer-RTSP OSD测试");
-
- //alert(cache+";"+playsound+";"+showtoscale+";"+showsatic);
-
- }
-
- function startplay() {
- var obj = document.getElementById("EasyPlayerOcx");
- var url = document.getElementById("url").value;
- var rendertype = document.getElementById("rendertype").value;
- var name = document.getElementById("name").value;
- var password = document.getElementById("password").value;
- var harddecode = document.getElementById("harddecode").checked ? 1 : 0;
- var rtpovertcp = document.getElementById("rtpovertcp").checked ? 1 : 0;
- obj.Start(url, rendertype, name, password, harddecode,rtpovertcp);
- config();
-
- //alert(url+";"+rendertype+";"+name+";"+password);
-
- }
-
- function stopplay() {
- //alert("Close()!!!!!");
- var obj = document.getElementById("EasyPlayerOcx");
-
- obj.Close();
- }
-
- </script>
- <style>
- input[type=range] {
- border-radius: 10px;
- border: none;
- margin-top: 0;
- }
-
- input[type=range]::-ms-track {
- border-radius: 10px;
- border-color: transparent;
- color: transparent;
- }
-
- input[type=range]::-ms-thumb {
- border: solid 0.125em rgba(205, 224, 230, 0.5);
- height: 10px;
- width: 25px;
- background: #f0f0f0;
- box-shadow: 0 .125em .125em #3b4547;
- }
-
- input[type=range]::-ms-fill-lower {
- border-radius: 10px;
- background: linear-gradient(to right, #059CFA, white 100%, white);
- }
-
- input[type=range]::-ms-fill-upper {
- border-radius: 10px;
- background: #ffffff;
- }
-
- input[type=range]:focus::-ms-fill-lower {
- background: linear-gradient(to right, #059CFA, white 100%, white);
- }
-
- input[type=range]:focus::-ms-fill-upper {
- background: #ffffff;
- }
-
- .buttons {
- padding-top: 10px;
- position: relative;
- height: 35px;
- }
-
- button {
- color: #333;
- background-color: #fff;
- border-color: #ccc;
- display: inline-block;
- padding: 6px 12px;
- margin-bottom: 0;
- font-size: 12px;
- font-weight: 400;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- touch-action: manipulation;
- cursor: pointer;
- user-select: none;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- width: 65px;
- height: 35px;
- position: absolute;
- bottom: 0px;
- left: 50%;
- }
-
- .start {
- background: #286090;
- color: #fff;
- margin-left: -85px;
- }
-
- .stop {
- background: #e6e6e6;
- color: #000;
- margin-left: 0px;
- }
- </style>
- </HEAD>
-
- <BODY>
- <center>
- <p></p>
-
-
- <OBJECT ID="EasyPlayerOcx" WIDTH="1280px" HEIGHT="600px" CLASSID="CLSID:1EE1C648-F4A9-42F9-9AA7-2C8E3AF7B7FD">
-
- </OBJECT>
-
- <br><br>
- RTSP URL:
- <input type="text" name="url" id="url" size=128 VALUE="rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov" />
- <br> <br>
-
-
- 用户名:
- <input type="text" name="name" id="name" size=25 value="" /> 密码:
- <input type="text" name="password" id="password" size=25 value="" />
- <br>
-
- 缓存:
- <input type="range" max="10" min="1" name="cache" id="cache" size=25 value="3" />
-
- RenderFormat:
- <input type="range" max="7" min="1" name="rendertype" id="rendertype" VALUE="7" />
- <br>
- RTP Over TCP:
- <input type="checkbox" name="rtpovertcp" id="rtpovertcp" size=25 checked="checked" />
-
- 播放声音:
- <input type="checkbox" name="playsound" id="playsound" size=25 value="1" checked="checked"/>
-
- 采用硬解码:
- <input type="checkbox" name="harddecode" id="harddecode" size=25 value="1" checked="checked"/>
-
- 按比例显示:
- <input type="checkbox" name="showtoscale" id="showtoscale" size=25 value="1" checked="checked" />
-
- 显示码率信息:
- <input type="checkbox" name="showsatic" id="showsatic" size=25 value="1" checked="checked" />
- <br>
- <div class="buttons">
- <button class="start" type="button" onclick="startplay();">Start</button>
- <button class="stop" type="button" onclick="stopplay();">Stop</button>
- </div>
-
- </center>
- </BODY>
-
- </HTML>
|