胡斌

1.add ss_version

2.adjust layout
3.set default websocket port to 6080
正在显示 1 个修改的文件 包含 32 行增加27 行删除
@@ -332,6 +332,13 @@ a:active { @@ -332,6 +332,13 @@ a:active {
332 else if(11 == result){//ss_start success 332 else if(11 == result){//ss_start success
333 playRTMPStream("rtmp://127.0.0.1:" + rtmp_port + "/live/ss"); 333 playRTMPStream("rtmp://127.0.0.1:" + rtmp_port + "/live/ss");
334 } 334 }
  335 + else if(24 <= result && 26 >= result){
  336 + if(data_len >= 4){
  337 + var version = dv.getUint32(8, true);
  338 + document.getElementById('ss_version_result').value = version.toString();
  339 + writeToScreen('<span style="color: green;">result: ' + version + ' </span>');
  340 + }
  341 + }
335 else if(55 == result){//ds_start success 342 else if(55 == result){//ds_start success
336 playRTMPStream("rtmp://127.0.0.1:" + rtmp_port + "/live/ds"); 343 playRTMPStream("rtmp://127.0.0.1:" + rtmp_port + "/live/ds");
337 } 344 }
@@ -514,6 +521,9 @@ a:active { @@ -514,6 +521,9 @@ a:active {
514 else if(cmdName == "ss_stop"){ 521 else if(cmdName == "ss_stop"){
515 cmd.type = 7; 522 cmd.type = 7;
516 } 523 }
  524 + else if(cmdName == "ss_version"){
  525 + cmd.type = 14;
  526 + }
517 else if(cmdName == "get_mic"){ 527 else if(cmdName == "get_mic"){
518 cmd.type = 26; 528 cmd.type = 26;
519 } 529 }
@@ -702,7 +712,7 @@ function getExplorerTitle() { @@ -702,7 +712,7 @@ function getExplorerTitle() {
702 { 712 {
703 output = document.getElementById("output"); 713 output = document.getElementById("output");
704 714
705 - document.getElementById( 'websocketURL' ).value = "ws://127.0.0.1:8090"; 715 + document.getElementById( 'websocketURL' ).value = "ws://127.0.0.1:6080";
706 716
707 document.getElementById( 'inputURL' ).value = queryParameters['source']; 717 document.getElementById( 'inputURL' ).value = queryParameters['source'];
708 718
@@ -858,9 +868,9 @@ function getExplorerTitle() { @@ -858,9 +868,9 @@ function getExplorerTitle() {
858 </tr> 868 </tr>
859 <tr> 869 <tr>
860 <td colspan="4" align="left" bgcolor="#191919"> 870 <td colspan="4" align="left" bgcolor="#191919">
861 - <table width="100%" border="0" cellspacing="0" cellpadding="0"> 871 + <table width="100%" border="0" cellspacing="10" cellpadding="0">
862 <tr> 872 <tr>
863 - <td width="64%"> 873 + <td >
864 <table width="65%" border="0" cellspacing="0" cellpadding="0"> 874 <table width="65%" border="0" cellspacing="0" cellpadding="0">
865 <tr> 875 <tr>
866 <!-- Here goes the StrobeMediaPlayback --> 876 <!-- Here goes the StrobeMediaPlayback -->
@@ -896,11 +906,13 @@ function getExplorerTitle() { @@ -896,11 +906,13 @@ function getExplorerTitle() {
896 </tr> 906 </tr>
897 <tr> 907 <tr>
898 <td background="images/upperright_03.gif"> 908 <td background="images/upperright_03.gif">
899 - <table border="0" cellspacing="0" cellpadding="0"> 909 + <table border="0" cellspacing="4" cellpadding="0">
900 <tr> 910 <tr>
901 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 911 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
902 <td colspan="2"><button type="button" id="get_rtmp_port" onclick="onTestClick(this)">get_rtmp_port</button></td> 912 <td colspan="2"><button type="button" id="get_rtmp_port" onclick="onTestClick(this)">get_rtmp_port</button></td>
903 - <td colspan="4"><input id="rtmp_port" readonly="readonly" /></td> 913 + <td colspan="1"><input id="rtmp_port" readonly="readonly" size="10" /></td>
  914 + <td colspan="2" align="center"><button type="button" id="ss_version" onclick="onTestClick(this)">ss_version</button></td>
  915 + <td colspan="1"><input id="ss_version_result" readonly="readonly" size="10"/></td>
904 </tr> 916 </tr>
905 <tr> 917 <tr>
906 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 918 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
@@ -919,46 +931,39 @@ function getExplorerTitle() { @@ -919,46 +931,39 @@ function getExplorerTitle() {
919 <td colspan="2"><button type="button" id="get_mic" onclick="javascript:onTestClick(this);">get_mic</button></td> 931 <td colspan="2"><button type="button" id="get_mic" onclick="javascript:onTestClick(this);">get_mic</button></td>
920 <td colspan="4"> 932 <td colspan="4">
921 <img src="images/spacer.gif" width="5" height="10" /> 933 <img src="images/spacer.gif" width="5" height="10" />
922 - <select width="300" id="mics" name="mics" /> 934 + <select id="mics" name="mics"/>
923 </td> 935 </td>
924 </tr> 936 </tr>
925 <tr> 937 <tr>
926 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 938 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
927 <td colspan="2"><button type="button" id="aud_start" onclick="javascript:onTestClick(this);">aud_start</button></td> 939 <td colspan="2"><button type="button" id="aud_start" onclick="javascript:onTestClick(this);">aud_start</button></td>
928 - <td colspan="4"></td>  
929 <td colspan="2"><button type="button" id="aud_stop" onclick="javascript:onTestClick(this);">aud_stop</button></td> 940 <td colspan="2"><button type="button" id="aud_stop" onclick="javascript:onTestClick(this);">aud_stop</button></td>
930 - </tr>  
931 - <tr>  
932 - <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>  
933 - <td colspan="2"><button type="button" id="get_mic_vol" onclick="javascript:onTestClick(this);">get_mic_vol</button></td>  
934 - <td colspan="4"><input id="mic_vol" width="400" /></td>  
935 - <td colspan="2"><button type="button" id="set_mic_vol" onclick="javascript:onTestClick(this);">set_mic_vol</button></td> 941 + <td colspan="1" align="center"><button type="button" id="get_mic_vol" onclick="javascript:onTestClick(this);">get_mic_vol</button></td>
  942 + <td colspan="1"><input id="mic_vol" size="10" /></td>
  943 + <td colspan="1"><button type="button" id="set_mic_vol" onclick="javascript:onTestClick(this);">set_mic_vol</button></td>
936 </tr> 944 </tr>
937 <tr> 945 <tr>
938 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 946 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
939 <td colspan="2"><button type="button" id="mov_start" onclick="javascript:onTestClick(this);">mov_start</button></td> 947 <td colspan="2"><button type="button" id="mov_start" onclick="javascript:onTestClick(this);">mov_start</button></td>
940 - <td colspan="4"> <input id="duration" readonly="readonly" size="10" /></td>  
941 - <td colspan="2"><button type="button" id="mov_stop" onclick="javascript:onTestClick(this);">mov_stop</button></td> 948 + <td colspan="2"> <input id="duration" readonly="readonly" size="10" /></td>
  949 + <td colspan="1" align="center"><button type="button" id="mov_stop" onclick="javascript:onTestClick(this);">mov_stop</button></td>
942 </tr> 950 </tr>
943 <tr> 951 <tr>
944 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 952 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
945 - <td colspan="2"><button type="button" id="mov_pause" onclick="javascript:onTestClick(this);">mov_pause</button></td>  
946 - <td colspan="4"><button type="button" id="mov_seek" onclick="javascript:onTestClick(this);">mov_seek</button><input id="mov_pos" size="10" /></td>  
947 - <td colspan="2"><button type="button" id="mov_resume" onclick="javascript:onTestClick(this);">mov_resume</button></td> 953 + <td colspan="2"><button type="button" id="mov_seek" onclick="javascript:onTestClick(this);">mov_seek</button></td>
  954 + <td colspan="2"><input id="mov_pos" size="10" /></td>
  955 + <td colspan="1" align="center"><button type="button" id="mov_pause" onclick="javascript:onTestClick(this);">mov_pause</button></td>
  956 + <td colspan="1"><button type="button" id="mov_resume" onclick="javascript:onTestClick(this);">mov_resume</button></td>
948 </tr> 957 </tr>
949 <tr> 958 <tr>
950 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 959 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
951 <td colspan="2"><button type="button" id="get_cam" onclick="javascript:onTestClick(this);">get_cam</button></td> 960 <td colspan="2"><button type="button" id="get_cam" onclick="javascript:onTestClick(this);">get_cam</button></td>
952 - <td colspan="4"> 961 + <td colspan="3">
953 <img src="images/spacer.gif" width="5" height="10" /> 962 <img src="images/spacer.gif" width="5" height="10" />
954 <select width="300" id="cameras" name="cameras" /> 963 <select width="300" id="cameras" name="cameras" />
955 </td> 964 </td>
956 - </tr>  
957 - <tr>  
958 - <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>  
959 - <td colspan="2"><button type="button" id="cam_start" onclick="javascript:onTestClick(this);">cam_start</button></td>  
960 - <td colspan="4"></td>  
961 - <td colspan="2"><button type="button" id="cam_stop" onclick="javascript:onTestClick(this);">cam_stop</button></td> 965 + <td colspan="1"><button type="button" id="cam_start" onclick="javascript:onTestClick(this);">cam_start</button></td>
  966 + <td colspan="1"><button type="button" id="cam_stop" onclick="javascript:onTestClick(this);">cam_stop</button></td>
962 </tr> 967 </tr>
963 <tr> 968 <tr>
964 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 969 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
@@ -980,7 +985,7 @@ function getExplorerTitle() { @@ -980,7 +985,7 @@ function getExplorerTitle() {
980 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 985 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
981 <td colspan="2"><button type="button" id="start_record" onclick="javascript:onTestClick(this);">start_record</button></td> 986 <td colspan="2"><button type="button" id="start_record" onclick="javascript:onTestClick(this);">start_record</button></td>
982 <td colspan="4"> 987 <td colspan="4">
983 - <input id="start_record_input" size="45" list="start_record_sample_list" /> 988 + <input id="start_record_input" size="50" list="start_record_sample_list" />
984 <datalist id="start_record_sample_list"> 989 <datalist id="start_record_sample_list">
985 <option value="0 video=scr audio=mic" /> 990 <option value="0 video=scr audio=mic" />
986 <option value="1 video=doc audio=mic" /> 991 <option value="1 video=doc audio=mic" />
@@ -993,7 +998,7 @@ function getExplorerTitle() { @@ -993,7 +998,7 @@ function getExplorerTitle() {
993 <tr> 998 <tr>
994 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td> 999 <td colspan="1"><img src="images/spacer.gif" width="5" height="10" /></td>
995 <td colspan="2"><button type="button" id="get_videoparam" onclick="javascript:onTestClick(this);">get_videoparam</button></td> 1000 <td colspan="2"><button type="button" id="get_videoparam" onclick="javascript:onTestClick(this);">get_videoparam</button></td>
996 - <td colspan="1"> 1001 + <td colspan="1" align="center">
997 <select id="sources" name="sources"> 1002 <select id="sources" name="sources">
998 <option value="scr">scr</option> 1003 <option value="scr">scr</option>
999 <option value="doc">doc</option> 1004 <option value="doc">doc</option>