implement:
set_videoparam, start_push,stop_push ss_start with input parameter adjust layout
正在显示
1 个修改的文件
包含
65 行增加
和
47 行删除
| @@ -228,7 +228,15 @@ a:active { | @@ -228,7 +228,15 @@ a:active { | ||
| 228 | queryParameters['source'] = "rtmp://127.0.0.1/live/cs"; | 228 | queryParameters['source'] = "rtmp://127.0.0.1/live/cs"; |
| 229 | initialise(); | 229 | initialise(); |
| 230 | } | 230 | } |
| 231 | + else if(95 == result){//get_videoparam success | ||
| 232 | + var data = new Uint8Array(evt.target.result, 8, evt.target.result.byteLength - 8 -1); | ||
| 233 | + var data_sting = new TextDecoder("utf-8").decode(data); | ||
| 234 | + var td = document.getElementById('videoparam'); | ||
| 235 | + td.value = data_sting; | ||
| 236 | + writeToScreen('<span style="color: blue;">get_videoparam result: ' + data_sting + ' </span>'); | ||
| 237 | + } | ||
| 231 | else{ | 238 | else{ |
| 239 | + var data = new Uint8Array(evt.target.result, 8, evt.target.result.byteLength - 8); | ||
| 232 | var data_sting = new TextDecoder("utf-8").decode(data); | 240 | var data_sting = new TextDecoder("utf-8").decode(data); |
| 233 | writeToScreen('<span style="color: blue;">RESPONSE: ' + data_sting + ' </span>'); | 241 | writeToScreen('<span style="color: blue;">RESPONSE: ' + data_sting + ' </span>'); |
| 234 | } | 242 | } |
| @@ -283,6 +291,9 @@ a:active { | @@ -283,6 +291,9 @@ a:active { | ||
| 283 | } | 291 | } |
| 284 | else if(obj.id == "ss_start"){ | 292 | else if(obj.id == "ss_start"){ |
| 285 | cmd.type = 6; | 293 | cmd.type = 6; |
| 294 | + var param = document.getElementById("ss_start_input"); | ||
| 295 | + cmd.data = new TextEncoder("utf-8").encode(param.value); | ||
| 296 | + cmd.data_len = cmd.data.length; | ||
| 286 | } | 297 | } |
| 287 | else if(obj.id == "ss_stop"){ | 298 | else if(obj.id == "ss_stop"){ |
| 288 | cmd.type = 7; | 299 | cmd.type = 7; |
| @@ -341,6 +352,33 @@ a:active { | @@ -341,6 +352,33 @@ a:active { | ||
| 341 | else if(obj.id == "cam_stop"){ | 352 | else if(obj.id == "cam_stop"){ |
| 342 | cmd.type = 43; | 353 | cmd.type = 43; |
| 343 | } | 354 | } |
| 355 | + else if(obj.id == "set_videoparam"){ | ||
| 356 | + cmd.type = 46; | ||
| 357 | + var param = document.getElementById("videoparam"); | ||
| 358 | + cmd.data = new TextEncoder("utf-8").encode(param.value); | ||
| 359 | + cmd.data_len = cmd.data.length; | ||
| 360 | + } | ||
| 361 | + else if(obj.id == "get_videoparam"){ | ||
| 362 | + cmd.type = 47; | ||
| 363 | + var sourceSel = document.getElementById("sources"); | ||
| 364 | + var index = sourceSel.selectedIndex; | ||
| 365 | + cmd.data = new TextEncoder("utf-8").encode(sourceSel.options[index].text); | ||
| 366 | + cmd.data_len = cmd.data.length; | ||
| 367 | + } | ||
| 368 | + else if(obj.id == "start_push"){ | ||
| 369 | + cmd.type = 50; | ||
| 370 | + var param = document.getElementById("start_push_input"); | ||
| 371 | + cmd.data = new TextEncoder("utf-8").encode(param.value); | ||
| 372 | + cmd.data_len = cmd.data.length; | ||
| 373 | + } | ||
| 374 | + else if(obj.id == "stop_push"){ | ||
| 375 | + cmd.type = 51; | ||
| 376 | + var param = document.getElementById("start_push_input"); | ||
| 377 | + cmd.data = new TextEncoder("utf-8").encode(param.value); | ||
| 378 | + cmd.data_len = cmd.data.length; | ||
| 379 | + } | ||
| 380 | + | ||
| 381 | + | ||
| 344 | doSendWSCmd(cmd); | 382 | doSendWSCmd(cmd); |
| 345 | } | 383 | } |
| 346 | 384 | ||
| @@ -413,6 +451,7 @@ a:active { | @@ -413,6 +451,7 @@ a:active { | ||
| 413 | flashContentParent.innerHTML = "<div id=\"flashContent\"></div>"; | 451 | flashContentParent.innerHTML = "<div id=\"flashContent\"></div>"; |
| 414 | } | 452 | } |
| 415 | } | 453 | } |
| 454 | + queryParameters['type'] = "live"; | ||
| 416 | } | 455 | } |
| 417 | 456 | ||
| 418 | if( queryParameters['source'] == "" ) | 457 | if( queryParameters['source'] == "" ) |
| @@ -531,29 +570,20 @@ a:active { | @@ -531,29 +570,20 @@ a:active { | ||
| 531 | </head> | 570 | </head> |
| 532 | <body> | 571 | <body> |
| 533 | <table width="100" height="" border="0" align="left" cellpadding="0" cellspacing="0"> | 572 | <table width="100" height="" border="0" align="left" cellpadding="0" cellspacing="0"> |
| 534 | -<!-- fwtable fwsrc="080715_fms_splash_fireworks.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1526025482" fwnested="0" --> | ||
| 535 | -<tr><td width="41"><img src="images/spacer.gif" width="41" height="1" border="0" alt="" /></td> | ||
| 536 | - <td width="3"><img src="images/spacer.gif" width="3" height="1" border="0" alt="" /></td> | ||
| 537 | - <td width="647"><img src="images/spacer.gif" width="636" height="1" border="0" alt="" /></td> | ||
| 538 | - <td width="361"><img src="images/spacer.gif" width="358" height="1" border="0" alt="" /></td> | ||
| 539 | - <td width="44"><img src="images/spacer.gif" width="43" height="1" border="0" alt="" /></td> | ||
| 540 | - </tr> | ||
| 541 | - | ||
| 542 | - <tr valign="top"> | ||
| 543 | - <td rowspan="4" bgcolor="#191919"><img src="images/spacer.gif" width="55" height="50" /></td> | 573 | + <tr valign="top"> |
| 544 | <td rowspan="4"></td> | 574 | <td rowspan="4"></td> |
| 545 | <td height="327" colspan="3" bgcolor="#191919"> | 575 | <td height="327" colspan="3" bgcolor="#191919"> |
| 546 | - <table width="100%" border="0" cellspacing="0" cellpadding="0"> | 576 | + <table width="100" border="0" cellspacing="0" cellpadding="0"> |
| 547 | <tr> | 577 | <tr> |
| 548 | <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> | 578 | <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| 549 | <tr> | 579 | <tr> |
| 550 | <td width="61" colspan="4" bgcolor="#191919"><table width="100" border="0" cellspacing="0" cellpadding="0"> | 580 | <td width="61" colspan="4" bgcolor="#191919"><table width="100" border="0" cellspacing="0" cellpadding="0"> |
| 551 | <tr> | 581 | <tr> |
| 552 | <td width="93%"><table width="98%" border="0" cellpadding="0" cellspacing="0"> | 582 | <td width="93%"><table width="98%" border="0" cellpadding="0" cellspacing="0"> |
| 553 | - | 583 | + |
| 554 | 584 | ||
| 555 | <tr> | 585 | <tr> |
| 556 | - <td colspan="4" align="left" bgcolor="#191919"><img src="images/canvas.gif" alt="" name="index_r4_c3" width="1000" height="39" border="0" id="index_r4_c3"/></td> | 586 | + <td colspan="4" align="left" bgcolor="#191919"><img src="images/canvas.gif" alt="" name="index_r4_c3" width="1200" height="39" border="0" id="index_r4_c3"/></td> |
| 557 | </tr> | 587 | </tr> |
| 558 | 588 | ||
| 559 | <tr> | 589 | <tr> |
| @@ -579,33 +609,27 @@ a:active { | @@ -579,33 +609,27 @@ a:active { | ||
| 579 | </div> | 609 | </div> |
| 580 | <noscript> | 610 | <noscript> |
| 581 | <a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="images/ERROR_getFlashPlayer.gif" width="640" height="377" /></a> | 611 | <a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="images/ERROR_getFlashPlayer.gif" width="640" height="377" /></a> |
| 582 | - | ||
| 583 | - </noscript> | 612 | + </noscript> |
| 584 | </td> | 613 | </td> |
| 585 | </tr> | 614 | </tr> |
| 586 | - </table> | 615 | + </table> |
| 587 | </td> | 616 | </td> |
| 588 | - <td width="36%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> | 617 | + <td width="100"><table width="100" border="0" cellspacing="0" cellpadding="0"> |
| 618 | + <tr width="323"><td><span class="style75">click on following buttons to test liveserver method</span></td><td> </td> | ||
| 619 | + <td> </td></tr> | ||
| 589 | <tr> | 620 | <tr> |
| 590 | - <td width="359" height="186" background="images/upperright_03.gif"><table width="358" border="0" cellspacing="0" cellpadding="0"> | ||
| 591 | - <tr> | ||
| 592 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | ||
| 593 | - <td width="323"><span class="style75">click on following buttons to test liveserver method</span></td> | ||
| 594 | - </tr> | 621 | + <td width="800" height="300" background="images/upperright_03.gif"> |
| 622 | + <table width="510" border="0" cellspacing="0" cellpadding="0"> | ||
| 595 | <tr> | 623 | <tr> |
| 596 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 624 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 597 | <td colspan="3"><button type="button" id="ss_start" onclick="onTestClick(this)">ss_start</button></td> | 625 | <td colspan="3"><button type="button" id="ss_start" onclick="onTestClick(this)">ss_start</button></td> |
| 598 | - </tr> | ||
| 599 | - <tr> | ||
| 600 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 626 | + <td colspan="3"><input id="ss_start_input" width="400"/></td> |
| 601 | <td colspan="3"><button type="button" id="ss_stop" onclick="javascript:onTestClick(this);">ss_stop</button></td> | 627 | <td colspan="3"><button type="button" id="ss_stop" onclick="javascript:onTestClick(this);">ss_stop</button></td> |
| 602 | </tr> | 628 | </tr> |
| 603 | <tr> | 629 | <tr> |
| 604 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 630 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 605 | <td colspan="3"><button type="button" id="ds_start" onclick="javascript:onTestClick(this);">ds_start</button></td> | 631 | <td colspan="3"><button type="button" id="ds_start" onclick="javascript:onTestClick(this);">ds_start</button></td> |
| 606 | - </tr> | ||
| 607 | - <tr> | ||
| 608 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 632 | + <td colspan="3"><input id="ds_start_coord" width="400"/><input id="ds_start_window_name" width="400"/></td> |
| 609 | <td colspan="3"><button type="button" id="ds_stop" onclick="javascript:onTestClick(this);">ds_stop</button></td> | 633 | <td colspan="3"><button type="button" id="ds_stop" onclick="javascript:onTestClick(this);">ds_stop</button></td> |
| 610 | </tr> | 634 | </tr> |
| 611 | <tr> | 635 | <tr> |
| @@ -617,17 +641,13 @@ a:active { | @@ -617,17 +641,13 @@ a:active { | ||
| 617 | <tr> | 641 | <tr> |
| 618 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 642 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 619 | <td colspan="3"><button type="button" id="aud_start" onclick="javascript:onTestClick(this);">aud_start</button></td> | 643 | <td colspan="3"><button type="button" id="aud_start" onclick="javascript:onTestClick(this);">aud_start</button></td> |
| 620 | - </tr> | ||
| 621 | - <tr> | ||
| 622 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 644 | + <td colspan="3"></td> |
| 623 | <td colspan="3"><button type="button" id="aud_stop" onclick="javascript:onTestClick(this);">aud_stop</button></td> | 645 | <td colspan="3"><button type="button" id="aud_stop" onclick="javascript:onTestClick(this);">aud_stop</button></td> |
| 624 | </tr> | 646 | </tr> |
| 625 | <tr> | 647 | <tr> |
| 626 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 648 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 627 | <td colspan="3"><button type="button" id="mov_start" onclick="javascript:onTestClick(this);">mov_start</button></td> | 649 | <td colspan="3"><button type="button" id="mov_start" onclick="javascript:onTestClick(this);">mov_start</button></td> |
| 628 | - </tr> | ||
| 629 | - <tr> | ||
| 630 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 650 | + <td colspan="3"></td> |
| 631 | <td colspan="3"><button type="button" id="mov_stop" onclick="javascript:onTestClick(this);">mov_stop</button></td> | 651 | <td colspan="3"><button type="button" id="mov_stop" onclick="javascript:onTestClick(this);">mov_stop</button></td> |
| 632 | </tr> | 652 | </tr> |
| 633 | <tr> | 653 | <tr> |
| @@ -640,18 +660,21 @@ a:active { | @@ -640,18 +660,21 @@ a:active { | ||
| 640 | <tr> | 660 | <tr> |
| 641 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 661 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 642 | <td colspan="3"><button type="button" id="cam_start" onclick="javascript:onTestClick(this);">cam_start</button></td> | 662 | <td colspan="3"><button type="button" id="cam_start" onclick="javascript:onTestClick(this);">cam_start</button></td> |
| 643 | - </tr> | ||
| 644 | - <tr> | ||
| 645 | - <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 663 | + <td colspan="3"></td> |
| 646 | <td colspan="3"><button type="button" id="cam_stop" onclick="javascript:onTestClick(this);">cam_stop</button></td> | 664 | <td colspan="3"><button type="button" id="cam_stop" onclick="javascript:onTestClick(this);">cam_stop</button></td> |
| 647 | </tr> | 665 | </tr> |
| 648 | <tr> | 666 | <tr> |
| 649 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 667 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 650 | <td colspan="3"><button type="button" id="start_push" onclick="javascript:onTestClick(this);">start_push</button></td> | 668 | <td colspan="3"><button type="button" id="start_push" onclick="javascript:onTestClick(this);">start_push</button></td> |
| 669 | + <td colspan="3"><input id="start_push_input" width="800"/></td> | ||
| 670 | + <td colspan="3"><button type="button" id="stop_push" onclick="javascript:onTestClick(this);">stop_push</button></td> | ||
| 651 | </tr> | 671 | </tr> |
| 652 | <tr> | 672 | <tr> |
| 653 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> | 673 | <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td> |
| 654 | - <td colspan="3"><button type="button" id="stop_push" onclick="javascript:onTestClick(this);">stop_push</button></td> | 674 | + <td colspan="3"><button type="button" id="get_videoparam" onclick="javascript:onTestClick(this);">get_videoparam</button></td> |
| 675 | + <td><select width = "100" id="sources" name="sources" /><option value ="scr">scr</option><option value ="scr">doc</option> | ||
| 676 | + <option value ="scr">mov</option><option value ="scr">cam</option><<input id="videoparam" width="1000"/></td> | ||
| 677 | + <td colspan="5"><button type="button" id="set_videoparam" onclick="javascript:onTestClick(this);">set_videoparam</button></td> | ||
| 655 | </tr> | 678 | </tr> |
| 656 | </table></td> | 679 | </table></td> |
| 657 | </tr> | 680 | </tr> |
| @@ -673,17 +696,16 @@ a:active { | @@ -673,17 +696,16 @@ a:active { | ||
| 673 | <td colspan="2" valign="top" bgcolor="#191919"><table width="100" border="0" align="left" cellpadding="0" cellspacing="0"> | 696 | <td colspan="2" valign="top" bgcolor="#191919"><table width="100" border="0" align="left" cellpadding="0" cellspacing="0"> |
| 674 | <!-- fwtable fwsrc="080715_fms_splash_fireworks.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1526025482" fwnested="0" --> | 697 | <!-- fwtable fwsrc="080715_fms_splash_fireworks.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1526025482" fwnested="0" --> |
| 675 | <tr> | 698 | <tr> |
| 676 | - <td colspan="3" valign="top"><img src="images/spacer.gif" width="55" height="40" /></td> | 699 | + <td colspan="3" valign="top"><img src="images/spacer.gif" width="55" height="10" /></td> |
| 677 | </tr> | 700 | </tr> |
| 678 | <tr> | 701 | <tr> |
| 679 | <td colspan="3" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="0"> | 702 | <td colspan="3" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="0"> |
| 680 | <tr> | 703 | <tr> |
| 681 | - <td><span class="style69">STREAM YOUR OWN VIDEO</span></td> | 704 | + <td><span class="style69">Play RTMP stream</span></td> |
| 682 | </tr> | 705 | </tr> |
| 683 | <tr> | 706 | <tr> |
| 684 | <td bgcolor="#666666"><img src="images/spacer.gif" width="20" height="3" /></td> | 707 | <td bgcolor="#666666"><img src="images/spacer.gif" width="20" height="3" /></td> |
| 685 | </tr> | 708 | </tr> |
| 686 | - | ||
| 687 | <tr> | 709 | <tr> |
| 688 | <td><img src="images/spacer.gif" width="55" height="10" /></td> | 710 | <td><img src="images/spacer.gif" width="55" height="10" /></td> |
| 689 | </tr> | 711 | </tr> |
| @@ -712,7 +734,7 @@ a:active { | @@ -712,7 +734,7 @@ a:active { | ||
| 712 | </tr> | 734 | </tr> |
| 713 | </table></td> | 735 | </table></td> |
| 714 | </tr> | 736 | </tr> |
| 715 | - <td colspan="3" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="0"> | 737 | + <td colspan="3" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="0"> |
| 716 | <tr> | 738 | <tr> |
| 717 | <td><span class="style69">Connect Xuedianyun LiveServer</span></td> | 739 | <td><span class="style69">Connect Xuedianyun LiveServer</span></td> |
| 718 | </tr> | 740 | </tr> |
| @@ -744,15 +766,11 @@ a:active { | @@ -744,15 +766,11 @@ a:active { | ||
| 744 | </tr> | 766 | </tr> |
| 745 | </table></td> | 767 | </table></td> |
| 746 | </tr> | 768 | </tr> |
| 747 | - <tr> | ||
| 748 | - <td colspan="4"> </td> | ||
| 749 | - </tr> | ||
| 750 | </table></td> | 769 | </table></td> |
| 751 | </tr> | 770 | </tr> |
| 752 | </table></td> | 771 | </table></td> |
| 753 | </tr> | 772 | </tr> |
| 754 | - | ||
| 755 | </table> | 773 | </table> |
| 756 | -<div id="output"></div> | 774 | +<div id = output /> |
| 757 | </body> | 775 | </body> |
| 758 | </html> | 776 | </html> |
-
请 注册 或 登录 后发表评论