Commit 919dff7e99be3e483cf9ee4d0e780dc221d48d55
1 parent
3cc0e084
录制页面控制
Showing
4 changed files
with
43 additions
and
43 deletions
src/css/recording.css
| ... | ... | @@ -282,7 +282,7 @@ button { |
| 282 | 282 | position: absolute; |
| 283 | 283 | width: 100%; |
| 284 | 284 | height: 100%; |
| 285 | - background-color: rgba(0, 0, 0, 0.5); | |
| 285 | + background-color: rgba(0, 0, 0, 0.85); | |
| 286 | 286 | top: 0; |
| 287 | 287 | overflow: hidden; |
| 288 | 288 | z-index: 9999; } |
| ... | ... | @@ -332,7 +332,7 @@ button { |
| 332 | 332 | |
| 333 | 333 | .recording-ctrl-bar { |
| 334 | 334 | position: fixed; |
| 335 | - bottom: 80px; | |
| 335 | + bottom: 0px; | |
| 336 | 336 | width: 100%; |
| 337 | 337 | height: 80px; |
| 338 | 338 | background: #FFF; | ... | ... |
src/index.html
| ... | ... | @@ -98,8 +98,8 @@ |
| 98 | 98 | <div class="tab-content" style="position:relative;"> |
| 99 | 99 | <div class="tab-pane active" id="recordzone"> |
| 100 | 100 | <textarea id="HTMLeditor" title="HTML"></textarea> |
| 101 | - <textarea id="CSSeditor" title="CSS"></textarea> | |
| 102 | - <textarea id="JSeditor" title="Javascript"></textarea> | |
| 101 | + <textarea id="CSSeditor" title="CSS" style="display: none;"></textarea> | |
| 102 | + <textarea id="JSeditor" title="Javascript" style="display: none;"></textarea> | |
| 103 | 103 | </div> |
| 104 | 104 | <div class="tab-pane" id="replayzone"> |
| 105 | 105 | <textarea id="HTMLplayer"></textarea> |
| ... | ... | @@ -178,9 +178,6 @@ |
| 178 | 178 | <audio id="audio" autoplay></audio> |
| 179 | 179 | </div> |
| 180 | 180 | <div class="save-wrap"> |
| 181 | - <div class="upload-tip" style="display: none;"> | |
| 182 | - <img src="img/upload_tip.png" alt=""> | |
| 183 | - </div> | |
| 184 | 181 | <input type="button" id="upload" class="upload-teach" style="display: ;" disabled="disabled" value="保存"> |
| 185 | 182 | <input type="button" id="savecorde" class="upload-stud" style="display: none;" disabled="disabled" value="保存"> |
| 186 | 183 | <input type="button" id="cancel" value="关闭"> |
| ... | ... | @@ -198,7 +195,10 @@ |
| 198 | 195 | <div class="recording-time" value=""></div> |
| 199 | 196 | </div> --> |
| 200 | 197 | |
| 201 | - | |
| 198 | + <div class="upload-tip" style="display: none;"> | |
| 199 | + <img src="img/upload_tip.png" alt=""> | |
| 200 | + </div> | |
| 201 | + | |
| 202 | 202 | <div class="record-before"> |
| 203 | 203 | <div class="tip" style="display: none;"> |
| 204 | 204 | <a class="start-btn"></a> |
| ... | ... | @@ -291,7 +291,7 @@ |
| 291 | 291 | audio.addEventListener("ended", function() { |
| 292 | 292 | timer.stopTimer(); |
| 293 | 293 | $('.audio-play').attr('data', '1') |
| 294 | - | |
| 294 | + $('.audio-play').prop('disabled', false); | |
| 295 | 295 | }, false); |
| 296 | 296 | |
| 297 | 297 | ... | ... |
src/js/gbreplayer.js
| ... | ... | @@ -535,42 +535,42 @@ $(function(){ |
| 535 | 535 | // 播放录制代码过程 |
| 536 | 536 | $('.audio-play').click(function(){ |
| 537 | 537 | var data = $(this).attr('data'); |
| 538 | - timer.init($recording_time); | |
| 539 | - if (data == 1){ | |
| 540 | - if (_role == 0) { | |
| 541 | - recorder.play(audio); | |
| 542 | - } | |
| 543 | - $(this).attr('data', 0).attr('title', '播放录音'); | |
| 544 | - $(this).css('background-color', '#F0F3F5'); | |
| 538 | + | |
| 545 | 539 | |
| 546 | - var playbtn= $('#play'), | |
| 547 | - playbackrecord = GBCodePlayBack.records; | |
| 548 | - | |
| 549 | - GBCodePlayBack.triggertotal = 0; | |
| 540 | + if (_role == 0) { | |
| 541 | + $('.audio-play').attr('disabled', true); | |
| 542 | + recorder.play(audio); | |
| 543 | + } | |
| 544 | + $(this).attr('data', 0).attr('data-original-title', '播放录音'); | |
| 550 | 545 | |
| 551 | - /* 初始化播放 */ | |
| 552 | - for(var i=0;i<playbackrecord.length;i++){ | |
| 553 | - playbackrecord[i].trigger = 0; | |
| 554 | - } | |
| 546 | + var playbtn= $('#play'), | |
| 547 | + playbackrecord = GBCodePlayBack.records; | |
| 548 | + | |
| 549 | + GBCodePlayBack.triggertotal = 0; | |
| 555 | 550 | |
| 556 | - for(var i=0;i<GBCodePlayBack.recordtimeoutcontrolls.length;i++){ | |
| 557 | - clearTimeout(GBCodePlayBack.recordtimeoutcontrolls[i]); | |
| 558 | - } | |
| 559 | - | |
| 560 | - GBCodePlayBack.recordtimeoutcontrolls = []; | |
| 561 | - /* END 初始化播放 */ | |
| 562 | - | |
| 563 | - GBCodePlayBack.htmlplayereditor.setValue(''); | |
| 564 | - GBCodePlayBack.cssplayereditor.setValue(''); | |
| 565 | - GBCodePlayBack.jsplayereditor.setValue(''); | |
| 566 | - | |
| 567 | - playbtn.data('status', 0); | |
| 568 | - $('#play').trigger('click'); | |
| 551 | + /* 初始化播放 */ | |
| 552 | + for(var i=0;i<playbackrecord.length;i++){ | |
| 553 | + playbackrecord[i].trigger = 0; | |
| 554 | + } | |
| 569 | 555 | |
| 570 | - } else if(data == 0) { | |
| 571 | - $(this).attr('data', 1).attr('title', '预览录制'); | |
| 572 | - $(this).css('background-color', ' #7FDE94') | |
| 573 | - } | |
| 556 | + for(var i=0;i<GBCodePlayBack.recordtimeoutcontrolls.length;i++){ | |
| 557 | + clearTimeout(GBCodePlayBack.recordtimeoutcontrolls[i]); | |
| 558 | + } | |
| 559 | + | |
| 560 | + GBCodePlayBack.recordtimeoutcontrolls = []; | |
| 561 | + /* END 初始化播放 */ | |
| 562 | + GBCodePlayBack.htmlplayereditor.setValue(''); | |
| 563 | + GBCodePlayBack.cssplayereditor.setValue(''); | |
| 564 | + GBCodePlayBack.jsplayereditor.setValue(''); | |
| 565 | + | |
| 566 | + playbtn.data('status', 0); | |
| 567 | + $('#play').trigger('click'); | |
| 568 | + | |
| 569 | + // if (data == 1){ | |
| 570 | + | |
| 571 | + // } else if(data == 0) { | |
| 572 | + // $(this).attr('data', 1).attr('data-original-title', '预览录制'); | |
| 573 | + // } | |
| 574 | 574 | |
| 575 | 575 | }); |
| 576 | 576 | ... | ... |
src/scss/recording.scss
| ... | ... | @@ -368,7 +368,7 @@ button{ |
| 368 | 368 | position: absolute; |
| 369 | 369 | width: 100%; |
| 370 | 370 | height: 100%; |
| 371 | - background-color: rgba(0, 0, 0, 0.5); | |
| 371 | + background-color: rgba(0, 0, 0, 0.85); | |
| 372 | 372 | top: 0; |
| 373 | 373 | overflow: hidden; |
| 374 | 374 | z-index: 9999; |
| ... | ... | @@ -433,7 +433,7 @@ button{ |
| 433 | 433 | // 录制控制条 |
| 434 | 434 | .recording-ctrl-bar{ |
| 435 | 435 | position: fixed; |
| 436 | - bottom: 80px; | |
| 436 | + bottom: 0px; | |
| 437 | 437 | width: 100%; |
| 438 | 438 | height: 80px; |
| 439 | 439 | background: #FFF; | ... | ... |