Commit d3a34dc11677723e2874608e921189588a2ffc8e
1 parent
c6b9deaf
test
Showing
10 changed files
with
66 additions
and
561 deletions
dist/gxb-ide/Dir.js
| @@ -15,6 +15,10 @@ | @@ -15,6 +15,10 @@ | ||
| 15 | 15 | ||
| 16 | var isReplayPage = false; | 16 | var isReplayPage = false; |
| 17 | 17 | ||
| 18 | + var u = navigator.userAgent; | ||
| 19 | + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 | ||
| 20 | + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 | ||
| 21 | + | ||
| 18 | /* | 22 | /* |
| 19 | * 初始化目录配置 | 23 | * 初始化目录配置 |
| 20 | */ | 24 | */ |
| @@ -141,9 +145,10 @@ | @@ -141,9 +145,10 @@ | ||
| 141 | console.log('////---------------------------') | 145 | console.log('////---------------------------') |
| 142 | console.log(treeLinkEditor); | 146 | console.log(treeLinkEditor); |
| 143 | for (var i = 0; i < treeLinkEditor.length; i++) { | 147 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 148 | + $('.fileName').html(treeLinkEditor[i].filePath) | ||
| 144 | if(treeLinkEditor[i].name == _this.manageName(obj.treeNode.name)){ | 149 | if(treeLinkEditor[i].name == _this.manageName(obj.treeNode.name)){ |
| 145 | console.log(_this.manageName(obj.treeNode.name)); | 150 | console.log(_this.manageName(obj.treeNode.name)); |
| 146 | - $('.fileName').html(treeLinkEditor[i].filePath) | 151 | + |
| 147 | _num = i; | 152 | _num = i; |
| 148 | } | 153 | } |
| 149 | } | 154 | } |
| @@ -614,16 +619,21 @@ | @@ -614,16 +619,21 @@ | ||
| 614 | 619 | ||
| 615 | initTrigger(coderecords) | 620 | initTrigger(coderecords) |
| 616 | 621 | ||
| 622 | + if(isAndroid){ | ||
| 623 | + playTimes++ | ||
| 624 | + } | ||
| 625 | + | ||
| 617 | AudioPlayer(audioUrl) | 626 | AudioPlayer(audioUrl) |
| 618 | 627 | ||
| 619 | var role = getQuery('role'); | 628 | var role = getQuery('role'); |
| 620 | if (role == 0) { | 629 | if (role == 0) { |
| 621 | - if (playTimes === 0) { | ||
| 622 | - // 请求玩立刻执行 | ||
| 623 | - // alert('play -----------123 ' + playTimes) | ||
| 624 | - $.AudioPlayer.play() | 630 | + if(!isAndroid){ |
| 631 | + // $.AudioPlayer.play() | ||
| 632 | + }else{ | ||
| 633 | + playTimes++ | ||
| 625 | } | 634 | } |
| 626 | }else{ | 635 | }else{ |
| 636 | + // alert('canplay !isAndroid ----------- ' + playTimes) | ||
| 627 | CodingEditer.playCoding(); | 637 | CodingEditer.playCoding(); |
| 628 | } | 638 | } |
| 629 | 639 | ||
| @@ -657,20 +667,24 @@ | @@ -657,20 +667,24 @@ | ||
| 657 | debuggers: false, | 667 | debuggers: false, |
| 658 | allowSeek: false, | 668 | allowSeek: false, |
| 659 | canplayCallback: function(res){ | 669 | canplayCallback: function(res){ |
| 660 | - if (res.status == true && playTimes === 0) { | ||
| 661 | - CodingEditer.playCoding(); | 670 | + if (res.status == true && playTimes === 0 && !isAndroid) { |
| 671 | + alert('canplay !isAndroid ----------- ' + playTimes) | ||
| 672 | + // CodingEditer.playCoding(); | ||
| 662 | playTimes++ | 673 | playTimes++ |
| 663 | - // alert('canplayCallback可以播放 ----------- ' + playTimes) | 674 | + // alert('canplay !isAndroid ----------- ' + playTimes) |
| 664 | } | 675 | } |
| 676 | + // alert('canplayCallback可以播放 ----------- ' + playTimes) | ||
| 665 | }, | 677 | }, |
| 666 | onwaitingCallback: function(){ | 678 | onwaitingCallback: function(){ |
| 667 | - console.log('onwaitingCallback ----------- ' + playTimes) | 679 | + // alert('onwaitingCallback ----------- ' + playTimes) |
| 668 | }, | 680 | }, |
| 669 | playCallback: function() { // 播放 | 681 | playCallback: function() { // 播放 |
| 682 | + | ||
| 670 | if (playTimes != 0) { | 683 | if (playTimes != 0) { |
| 671 | CodingEditer.playCoding(); | 684 | CodingEditer.playCoding(); |
| 685 | + // alert('playCoding可以播放 ----------- ' + playTimes) | ||
| 672 | } | 686 | } |
| 673 | - // CodingEditer.playCoding(); | 687 | + // alert('playCoding可以播放 ----------- ' + playTimes) |
| 674 | }, | 688 | }, |
| 675 | pauseCallback: function() { // 暂停 | 689 | pauseCallback: function() { // 暂停 |
| 676 | CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); | 690 | CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); |
dist/gxb-ide/Iterm.js
| 1 | ;(function(window){ | 1 | ;(function(window){ |
| 2 | + var _Iterm = window.Iterm; | ||
| 2 | 3 | ||
| 3 | - function Iterm(){ | 4 | + Iterm = function(){ |
| 4 | this.initIterm.apply(this, arguments); | 5 | this.initIterm.apply(this, arguments); |
| 5 | } | 6 | } |
| 6 | 7 | ||
| 7 | var isCompile = false; | 8 | var isCompile = false; |
| 9 | + var _languageid = getQuery('languageid'); | ||
| 10 | + var _userId = getQuery('userId'); | ||
| 8 | 11 | ||
| 9 | Iterm.prototype = { | 12 | Iterm.prototype = { |
| 10 | constructor: Iterm, | 13 | constructor: Iterm, |
| 11 | compileStatus: true, | 14 | compileStatus: true, |
| 12 | options: { | 15 | options: { |
| 13 | - userId: 826920, | ||
| 14 | - languageId: null, | 16 | + userId: _userId, |
| 17 | + languageId: _languageid, | ||
| 15 | compileCallback: null // 编译回调 | 18 | compileCallback: null // 编译回调 |
| 16 | }, | 19 | }, |
| 17 | initIterm: function(options){ | 20 | initIterm: function(options){ |
| @@ -36,7 +39,7 @@ | @@ -36,7 +39,7 @@ | ||
| 36 | // var languageId = _this.options.languageId; | 39 | // var languageId = _this.options.languageId; |
| 37 | var languageId = _this.options.languageId || Dir.languageid; | 40 | var languageId = _this.options.languageId || Dir.languageid; |
| 38 | var role = getQuery('role'); | 41 | var role = getQuery('role'); |
| 39 | - | 42 | + alert("HHHHHHH") |
| 40 | 43 | ||
| 41 | 44 | ||
| 42 | // 判断是否录制走不同的逻辑 | 45 | // 判断是否录制走不同的逻辑 |
dist/js/player.js
| @@ -3,13 +3,8 @@ $(function(){ | @@ -3,13 +3,8 @@ $(function(){ | ||
| 3 | var _userId = getQuery('userId'); | 3 | var _userId = getQuery('userId'); |
| 4 | var _role = getQuery('role'); | 4 | var _role = getQuery('role'); |
| 5 | var _codeReplayId = getQuery('codeReplayId'); | 5 | var _codeReplayId = getQuery('codeReplayId'); |
| 6 | - var player = $.AudioPlayer; | ||
| 7 | var status = true; | 6 | var status = true; |
| 8 | 7 | ||
| 9 | - var languageName = Dir.getLangName(_languageid); | ||
| 10 | - $("title").html(languageName); | ||
| 11 | - | ||
| 12 | - | ||
| 13 | // new一个基本IDE结构 | 8 | // new一个基本IDE结构 |
| 14 | var ide = new GxbIde({ | 9 | var ide = new GxbIde({ |
| 15 | el: '#folder', | 10 | el: '#folder', |
| @@ -19,13 +14,20 @@ $(function(){ | @@ -19,13 +14,20 @@ $(function(){ | ||
| 19 | }); | 14 | }); |
| 20 | 15 | ||
| 21 | // 编译控制台 | 16 | // 编译控制台 |
| 22 | - var iterm = new Iterm({ | ||
| 23 | - userId: _userId | ||
| 24 | - }); | 17 | + // var iterm = new Iterm({ |
| 18 | + // userId: _userId, | ||
| 19 | + // languageId: _languageid | ||
| 20 | + // }); | ||
| 21 | + | ||
| 22 | + // alert('==============') | ||
| 25 | 23 | ||
| 26 | var title = decodeURIComponent(getQuery('title')); | 24 | var title = decodeURIComponent(getQuery('title')); |
| 27 | 25 | ||
| 28 | $('.m-title').html(title); | 26 | $('.m-title').html(title); |
| 27 | + // alert('=============='+title) | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + // $('#resultoutput').append(title) | ||
| 29 | 31 | ||
| 30 | console.log(_role) | 32 | console.log(_role) |
| 31 | 33 | ||
| @@ -33,13 +35,16 @@ $(function(){ | @@ -33,13 +35,16 @@ $(function(){ | ||
| 33 | Dir.isReplayPage = true; | 35 | Dir.isReplayPage = true; |
| 34 | 36 | ||
| 35 | $('.play-code').on('click', function(){ | 37 | $('.play-code').on('click', function(){ |
| 36 | - console.log('=================') | ||
| 37 | - CodingEditer.playCoding(); | 38 | + alert('=================') |
| 39 | + // CodingEditer.playCoding(); | ||
| 38 | CodingEditer.editable(0) | 40 | CodingEditer.editable(0) |
| 39 | }) | 41 | }) |
| 40 | 42 | ||
| 43 | + $('#play').unbind('click').click(function(){ | ||
| 44 | + | ||
| 45 | + }) | ||
| 41 | 46 | ||
| 42 | - $('.m-menu').on('click', function(e){ | 47 | + $('.m-menu').unbind('click').click(function(e){ |
| 43 | // e.preventDefault(); | 48 | // e.preventDefault(); |
| 44 | console.log('////==========') | 49 | console.log('////==========') |
| 45 | if (status) { | 50 | if (status) { |
| @@ -50,8 +55,9 @@ $(function(){ | @@ -50,8 +55,9 @@ $(function(){ | ||
| 50 | status = true; | 55 | status = true; |
| 51 | } | 56 | } |
| 52 | }) | 57 | }) |
| 53 | - $('.m-dir-wrap').on('click', function(e){ | ||
| 54 | - console.log('////') | 58 | + |
| 59 | + $('.m-dir-wrap').unbind('click').click(function(e){ | ||
| 60 | + // e.preventDefault(); | ||
| 55 | if (!status) { | 61 | if (!status) { |
| 56 | $('.m-dir-wrap').hide(); | 62 | $('.m-dir-wrap').hide(); |
| 57 | status = true; | 63 | status = true; |
dist/v1.1/index1.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <meta name="renderer" content="webkit"> | ||
| 6 | - <title>录制课程 - 互动编程</title> | ||
| 7 | - <link rel="stylesheet" href="../css/reset.css"> | ||
| 8 | - <link rel="stylesheet" href="../css/responsive/css/bootstrap.min.css"> | ||
| 9 | - <link href="../css/validationEngine.jquery.css" rel="stylesheet"> | ||
| 10 | - <link href="../css/codemirror.css" rel="stylesheet"> | ||
| 11 | - <link href="../css/cm-theme/gbtags.css" rel="stylesheet"> | ||
| 12 | - <link href="../css/cm-theme/eclipse.css" rel="stylesheet"> | ||
| 13 | - <link href="../css/cm-theme/gbtags-dark.css" rel="stylesheet"> | ||
| 14 | - <link href="../css/font/iconfont.css" rel="stylesheet"> | ||
| 15 | - <link href="../css/font_all/iconfont.css" rel="stylesheet"> | ||
| 16 | - <link href="../css/layout.css" rel="stylesheet"> | ||
| 17 | - <link href="../css/main.css" rel="stylesheet"> | ||
| 18 | - <link href="../css/recording.css" rel="stylesheet"> | ||
| 19 | - <!-- <link href="http://lab.hakim.se/ladda/dist/ladda.min.css" rel="stylesheet"> --> | ||
| 20 | - <link rel="stylesheet" href="../js/zTree_v3-3.5.27/css/zTreeStyle/zTreeStyle.css"> | ||
| 21 | - | ||
| 22 | - <script> | ||
| 23 | - var gxb_api = "https://restful.gaoxiaobang.com"; | ||
| 24 | - // var gxb_api = "http://192.168.80.223:8080" | ||
| 25 | - | ||
| 26 | - </script> | ||
| 27 | - | ||
| 28 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 29 | - <script src="../js/bootstrap.js"></script> | ||
| 30 | - | ||
| 31 | - <script src="../js/humps-2.0.0/humps.js"></script> | ||
| 32 | - | ||
| 33 | - <script src="../js/util/util.js"></script> | ||
| 34 | - <script src="../js/util/Hourglass.js"></script> | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - <script src="../js/spin.js"></script> | ||
| 38 | - <script src="../js/ladda.js"></script> | ||
| 39 | - | ||
| 40 | - <script src="../js/jquery-ui-1.8.20.custom.js"></script> | ||
| 41 | - <script src="../js/codemirror.js"></script> | ||
| 42 | - <!-- <script src="../js/handlebars-1.3.js"></script> --> | ||
| 43 | - <script src="../js/emmet.js"></script> | ||
| 44 | - <script src="../js/jshint-2.6.min.js"></script> | ||
| 45 | - <script src="../js/jstorage.js"></script> | ||
| 46 | - | ||
| 47 | - <script src="../js/05-util.js"></script> | ||
| 48 | - <script src="../js/03-http.js"></script> | ||
| 49 | - | ||
| 50 | - <script src="../js/jquery.validationEngine.js"></script> | ||
| 51 | - <script src="../js/jquery.validationEngine-zh.js"></script> | ||
| 52 | - <script src="../js/jquery.isotope.js"></script> | ||
| 53 | - | ||
| 54 | - <link rel="stylesheet" href="../css/demo.css"> | ||
| 55 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.core.js"></script> | ||
| 56 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.exedit.js"></script> | ||
| 57 | - <script src="../js/gb.js"></script> | ||
| 58 | - <!-- <script src="../js/gbreplayer.js"></script> --> | ||
| 59 | - | ||
| 60 | - <script src="../js/gbdebug/mode/xml/xml.js"></script> | ||
| 61 | - <script src="../js/gbdebug/mode/javascript/javascript.js"></script> | ||
| 62 | - <script src="../js/gbdebug/mode/css/css.js"></script> | ||
| 63 | - <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script> | ||
| 64 | - <script src="../js/gbdebug/mode/clike/clike.js"></script> | ||
| 65 | - <script src="../js/gbdebug/mode/php/php.js"></script> | ||
| 66 | - <script src="../js/gbdebug/mode/python/python.js"></script> | ||
| 67 | - <style type="text/css"> | ||
| 68 | - #recordzone, | ||
| 69 | - #replayzone{ | ||
| 70 | - display: none; | ||
| 71 | - } | ||
| 72 | - #recordzone.active, | ||
| 73 | - #replayzone.active{ | ||
| 74 | - display: block; | ||
| 75 | - } | ||
| 76 | - .editor{ | ||
| 77 | - height: 100%; | ||
| 78 | - float: left; | ||
| 79 | - position: relative; | ||
| 80 | - } | ||
| 81 | - </style> | ||
| 82 | -</head> | ||
| 83 | -<body> | ||
| 84 | - <div id="app" class="wrapper"> | ||
| 85 | - <div id="appContainer"> | ||
| 86 | - <div class="editor"> | ||
| 87 | - <div id="appLeft"> | ||
| 88 | - <div class="tree-header">目录</div> | ||
| 89 | - <ul id="folder" class="ztree"></ul> | ||
| 90 | - <div id="handleLM"></div> | ||
| 91 | - </div> | ||
| 92 | - <div id="appMian"> | ||
| 93 | - <div id="appMainHeader"> | ||
| 94 | - <ul id="recordertab" class="nav nav-tabs pull-left"> | ||
| 95 | - <li class="active"><a href="#recordzone" data-toggle="tab"><i class="icon iconfont icon-suspend"></i>课程录制区</a></li> | ||
| 96 | - <li><a href="#replayzone" data-toggle="tab"><i class="icon iconfont icon-yulan"></i>课程预览区</a></li> | ||
| 97 | - </ul> | ||
| 98 | - <div id="editorwrapper" class="pull-right"> | ||
| 99 | - <div class="btn-group"> | ||
| 100 | - <div id="htmlbutton" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="当前课程环境:Java" data-editorname="html">JAVA</div> | ||
| 101 | - <div class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="JDK版本">JDK 7</div> | ||
| 102 | - </div> | ||
| 103 | - </div> | ||
| 104 | - </div> | ||
| 105 | - <div id="textarea"> | ||
| 106 | - <div id="recordzone" class="active"></div> | ||
| 107 | - <div id="replayzone"></div> | ||
| 108 | - </div> | ||
| 109 | - <div id="handleMR"></div> | ||
| 110 | - </div> | ||
| 111 | - <div class="pause-shodow hidden"> | ||
| 112 | - <div class="compile-loading"> | ||
| 113 | - <img src="../img/loading.png" alt=""> | ||
| 114 | - </div> | ||
| 115 | - <div class="compile-reslut" style="display: none;"> | ||
| 116 | - <div class="tip-header"> | ||
| 117 | - <span>成功获取编译运行结果</span> | ||
| 118 | - </div> | ||
| 119 | - <div class="tip-content"> | ||
| 120 | - <p>保存编译结果后,播放到此处会在运行区域直接显示结果。需要保存结果后继续录制吗?</p> | ||
| 121 | - </div> | ||
| 122 | - <div class="tip-footer"> | ||
| 123 | - <button class="btn btn-success btn-sm" id="save_compile">保存并继续录制</button> | ||
| 124 | - <button class="btn btn-danger btn-sm" id="cancel_compile">不保存继续录制</button> | ||
| 125 | - </div> | ||
| 126 | - </div> | ||
| 127 | - </div> | ||
| 128 | - </div> | ||
| 129 | - | ||
| 130 | - <div id="appRight"> | ||
| 131 | - <div id="resultpanel" class="panel panel-default editor-result"> | ||
| 132 | - <div class="panel-heading result-header"> | ||
| 133 | - <div class="pull-left"> | ||
| 134 | - <div id="compileBtnGroup" class="btn-group"></div> | ||
| 135 | - </div> | ||
| 136 | - <div class="pull-right"> | ||
| 137 | - <a id="full-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="全屏录制" class="btn btn-link"><i class="icon iconfont icon-fangda"></i></a> | ||
| 138 | - <a id="back-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="退出全屏录制" class="btn btn-link" style="display: none;"><i class="icon iconfont icon-fangda"></i></a> | ||
| 139 | - </div> | ||
| 140 | - <div class="btn-group"> | ||
| 141 | - <button type="button" class="btn btn-success" id="play" data-status="0" title="" style="display: none;"><</button> | ||
| 142 | - <!-- <p id="replay">预览录制</p> --> | ||
| 143 | - </div> | ||
| 144 | - <!-- <div class="btn-group pull-right" id="fontendrun"> | ||
| 145 | - <button id="autorun" type="button" class="btn" title="切换自动/手动运行代码" data-placement="bottom" data-autorun="1"></button> | ||
| 146 | - <button id="runnow" type="button" class="btn" title="手动运行代码" data-placement="bottom" disabled="disabled"> | ||
| 147 | - 自动运行 | ||
| 148 | - </button> | ||
| 149 | - </div> --> | ||
| 150 | - </div> | ||
| 151 | - <div class="panel-body hidden" id="cmprun-output"> | ||
| 152 | - <div id="resultoutput"> | ||
| 153 | - <!-- Nav tabs --> | ||
| 154 | - <ul class="nav nav-tabs result-tabs" role="tablist" id="cmprun-tabs"> | ||
| 155 | - <li class="active"><a href="#stdin" role="tab" data-toggle="tab" class="text-warning">标准</a></li> | ||
| 156 | - <li><a href="#cmpinfo" role="tab" data-toggle="tab" class="text-warning">编译</a></li> | ||
| 157 | - <li><a href="#stderr" role="tab" data-toggle="tab" class="text-danger">错误</a></li> | ||
| 158 | - <li><a href="#output" role="tab" data-toggle="tab" class="text-success">结果</a></li> | ||
| 159 | - </ul> | ||
| 160 | - <!-- Tab panes --> | ||
| 161 | - <div class="tab-content"> | ||
| 162 | - <div class="tab-pane active padall15" id="stdin"> | ||
| 163 | - <input type="text" class="form-control" id="runtimeArgus" placeholder="标准输入"> | ||
| 164 | - </div> | ||
| 165 | - <div class="tab-pane padall15" id="cmpinfo"></div> | ||
| 166 | - <div class="tab-pane padall15" id="stderr"></div> | ||
| 167 | - <div class="tab-pane padall15" id="output"></div> | ||
| 168 | - </div> | ||
| 169 | - </div> | ||
| 170 | - </div> | ||
| 171 | - <div class="panel-body" id="ifrcontainer"> | ||
| 172 | - <iframe id="resultiframe" frameBorder="0" width="100%"></iframe> | ||
| 173 | - </div> | ||
| 174 | - </div> | ||
| 175 | - </div> | ||
| 176 | - </div> | ||
| 177 | - <div id="appFooter"> | ||
| 178 | - <!-- 录音控制条 --> | ||
| 179 | - <input type="hidden" class="audio-url" value=""> | ||
| 180 | - <div class="recording-ctrl-bar"> | ||
| 181 | - <button id="start-recording" class="btn new-recording" type="button" data="1" title="开始录制"></button> | ||
| 182 | - <button id="re-recoding" class="btn new-recording" type="button" data="1" title="重新录制" style="display: none;"></button> | ||
| 183 | - <button class="btn pause-recording hidden" id="pause" data-status='0' title="录制暂停中"> | ||
| 184 | - <img src="../img/pause.svg" alt=""> | ||
| 185 | - </button> | ||
| 186 | - | ||
| 187 | - <button class="audio-play hidden" title="播放预览" data="1"> | ||
| 188 | - <i class="icon iconfont icon-play"></i> | ||
| 189 | - </button> | ||
| 190 | - <div class="recording-time" id="timer" value="">00:00:00</div> | ||
| 191 | - <div class="audio-view" style="display: none;"> | ||
| 192 | - <audio id="audio"></audio> | ||
| 193 | - </div> | ||
| 194 | - <div class="save-wrap"> | ||
| 195 | - <input type="button" id="upload" class="upload-teach" disabled="disabled" value="保存"> | ||
| 196 | - <input type="button" id="savecorde" class="upload-stud" style="display: none;" disabled="disabled" value="保存"> | ||
| 197 | - <input type="button" id="cancel" value="关闭"> | ||
| 198 | - </div> | ||
| 199 | - </div> | ||
| 200 | - </div> | ||
| 201 | - </div> | ||
| 202 | - <!-- --> | ||
| 203 | - <div class="upload-tip" style="display: none;"> | ||
| 204 | - <img src="../img/upload_tip.png" alt=""> | ||
| 205 | - </div> | ||
| 206 | - | ||
| 207 | - <div class="confirm-tip"> | ||
| 208 | - <div class="compile-reslut" style="display: ;"> | ||
| 209 | - <div class="tip-header"> | ||
| 210 | - <span>提示</span> | ||
| 211 | - </div> | ||
| 212 | - <div class="tip-content"> | ||
| 213 | - <p>在开始录制之前可对文件名进行修改,开始录制后文件名将不可修改。</p> | ||
| 214 | - </div> | ||
| 215 | - <div class="tip-footer"> | ||
| 216 | - <button class="btn btn-success btn-sm" id="confirm">确定</button> | ||
| 217 | - </div> | ||
| 218 | - </div> | ||
| 219 | - </div> | ||
| 220 | - | ||
| 221 | - <!-- 准备开始 --> | ||
| 222 | - <div id="countdown" style="display: none;"> | ||
| 223 | - <img src="" alt=""> | ||
| 224 | - </div> | ||
| 225 | - | ||
| 226 | - <!-- 重新开始 --> | ||
| 227 | - <div class="re-tips" style="display: none;"> | ||
| 228 | - <div class="re-reslut"> | ||
| 229 | - <div class="tip-header"> | ||
| 230 | - <span>提示</span> | ||
| 231 | - </div> | ||
| 232 | - <div class="tip-content"> | ||
| 233 | - <p>你确定要重新录制吗?</p> | ||
| 234 | - </div> | ||
| 235 | - <div class="tip-footer"> | ||
| 236 | - <button class="btn btn-success btn-sm" id="re-sure">确定</button> | ||
| 237 | - <button class="btn btn-danger btn-sm" id="re-cancel">取消</button> | ||
| 238 | - </div> | ||
| 239 | - </div> | ||
| 240 | - </div> | ||
| 241 | - | ||
| 242 | - | ||
| 243 | - <script src="../js/recorder/Myna.js"></script> | ||
| 244 | - <script src="../js/recording/recording.js"></script> | ||
| 245 | - | ||
| 246 | - <script> | ||
| 247 | - $(function () { | ||
| 248 | - $('[data-toggle="tooltip"]').tooltip() | ||
| 249 | - }) | ||
| 250 | - var recorder; | ||
| 251 | - var _role = getQuery('role'); | ||
| 252 | - var _chapterId = getQuery('chapterId'); | ||
| 253 | - var userId = getQuery('userId'); | ||
| 254 | - | ||
| 255 | - var audio = document.querySelector('audio'); | ||
| 256 | - var saveAudio = document.getElementById("save"); | ||
| 257 | - | ||
| 258 | - | ||
| 259 | - // 结束播放事件 | ||
| 260 | - audio.addEventListener("ended", function() { | ||
| 261 | - console.info('audio.addEventListener("ended"'); | ||
| 262 | - console.log('audio 播放结束'); | ||
| 263 | - Hourglass.stopTimer(); | ||
| 264 | - $('.audio-play').attr('data', '1') | ||
| 265 | - $('.audio-play').prop('disabled', false); | ||
| 266 | - }, false); | ||
| 267 | - | ||
| 268 | - $('#upload').click(function(){ | ||
| 269 | - uploadAudio() | ||
| 270 | - }) | ||
| 271 | - | ||
| 272 | - function uploadAudio() { | ||
| 273 | - $('.upload-tip').show(); | ||
| 274 | - recorder.upload(); | ||
| 275 | - } | ||
| 276 | - </script> | ||
| 277 | -</body> | ||
| 278 | -</html> | ||
| 279 | - | ||
| 280 | - | ||
| 281 | - |
dist/v1.1/player.html
| @@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
| 59 | </ul> | 59 | </ul> |
| 60 | </div> | 60 | </div> |
| 61 | <div class="m-title-wrap"> | 61 | <div class="m-title-wrap"> |
| 62 | - <div class="m-title">章节名称</div> | 62 | + <div class="m-title"></div> |
| 63 | <div class="m-menu"><span class="fileName"></span> <img src="../img/down.png" alt=""></div> | 63 | <div class="m-menu"><span class="fileName"></span> <img src="../img/down.png" alt=""></div> |
| 64 | </div> | 64 | </div> |
| 65 | <!-- 录制区 --> | 65 | <!-- 录制区 --> |
| @@ -149,13 +149,6 @@ | @@ -149,13 +149,6 @@ | ||
| 149 | <input type="hidden" class="audio-url" value=""> | 149 | <input type="hidden" class="audio-url" value=""> |
| 150 | <div id="playFooter"> | 150 | <div id="playFooter"> |
| 151 | <div class="" id="audioWrap"> | 151 | <div class="" id="audioWrap"> |
| 152 | - <button class="play-code" style="display: none;"> | ||
| 153 | - <img src="../img/play.svg" alt=""> | ||
| 154 | - <!-- <i class="icon iconfont icon-play"></i> --> | ||
| 155 | - </button> | ||
| 156 | - <button class="pause-play-code" style="display: none;"> | ||
| 157 | - <img src="../img/pause.svg" alt=""> | ||
| 158 | - </button> | ||
| 159 | </div> | 152 | </div> |
| 160 | </div> | 153 | </div> |
| 161 | </div> | 154 | </div> |
| @@ -212,7 +205,7 @@ | @@ -212,7 +205,7 @@ | ||
| 212 | <script src="../gxb-ide/Ide.js"></script> | 205 | <script src="../gxb-ide/Ide.js"></script> |
| 213 | <script src="../gxb-ide/ToolBox.js"></script> | 206 | <script src="../gxb-ide/ToolBox.js"></script> |
| 214 | 207 | ||
| 215 | - <script src="../js/player.js"></script> | 208 | + <script src="../js/player.js?v=0.0.3"></script> |
| 216 | 209 | ||
| 217 | <script src="../js/gbdebug/mode/xml/xml.js"></script> | 210 | <script src="../js/gbdebug/mode/xml/xml.js"></script> |
| 218 | <script src="../js/gbdebug/mode/javascript/javascript.js"></script> | 211 | <script src="../js/gbdebug/mode/javascript/javascript.js"></script> |
dist/v1.1/player2.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <meta name="renderer" content="webkit"> | ||
| 6 | - <title>播放课程 - 互动编程</title> | ||
| 7 | - <link rel="stylesheet" href="../css/reset.css"> | ||
| 8 | - <link rel="stylesheet" href="../css/responsive/css/bootstrap.min.css"> | ||
| 9 | - <link href="../css/validationEngine.jquery.css" rel="stylesheet"> | ||
| 10 | - <link href="../css/codemirror.css" rel="stylesheet"> | ||
| 11 | - <link href="../css/cm-theme/gbtags.css" rel="stylesheet"> | ||
| 12 | - <link href="../css/cm-theme/eclipse.css" rel="stylesheet"> | ||
| 13 | - <link href="../css/cm-theme/gbtags-dark.css" rel="stylesheet"> | ||
| 14 | - <link href="../css/font/iconfont.css" rel="stylesheet"> | ||
| 15 | - <link href="../css/font_all/iconfont.css" rel="stylesheet"> | ||
| 16 | - <link href="../css/layout.css" rel="stylesheet"> | ||
| 17 | - <link href="../css/main.css" rel="stylesheet"> | ||
| 18 | - <link href="../css/recording.css" rel="stylesheet"> | ||
| 19 | - <link rel="stylesheet" href="../js/audioPlayer/theme.default.css"> | ||
| 20 | - <!-- <link href="http://lab.hakim.se/ladda/dist/ladda.min.css" rel="stylesheet"> --> | ||
| 21 | - <link rel="stylesheet" href="../js/zTree_v3-3.5.27/css/zTreeStyle/zTreeStyle.css"> | ||
| 22 | - | ||
| 23 | - <script> | ||
| 24 | - var gxb_api = "https://restful1.gaoxiaobang.com"; | ||
| 25 | - // var gxb_api = "http://192.168.80.223:8080" | ||
| 26 | - | ||
| 27 | - </script> | ||
| 28 | - | ||
| 29 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 30 | - <script src="../js/bootstrap.js"></script> | ||
| 31 | - | ||
| 32 | - <script src="../js/humps-2.0.0/humps.js"></script> | ||
| 33 | - | ||
| 34 | - <script src="../js/util/util.js"></script> | ||
| 35 | - <script src="../js/util/Hourglass.js"></script> | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - <script src="../js/spin.js"></script> | ||
| 39 | - <script src="../js/ladda.js"></script> | ||
| 40 | - | ||
| 41 | - <script src="../js/jquery-ui-1.8.20.custom.js"></script> | ||
| 42 | - <script src="../js/codemirror.js"></script> | ||
| 43 | - <!-- <script src="../js/handlebars-1.3.js"></script> --> | ||
| 44 | - <script src="../js/emmet.js"></script> | ||
| 45 | - <script src="../js/jshint-2.6.min.js"></script> | ||
| 46 | - <script src="../js/jstorage.js"></script> | ||
| 47 | - | ||
| 48 | - <script src="../js/05-util.js"></script> | ||
| 49 | - <script src="../js/03-http.js"></script> | ||
| 50 | - | ||
| 51 | - <script src="../js/jquery.validationEngine.js"></script> | ||
| 52 | - <script src="../js/jquery.validationEngine-zh.js"></script> | ||
| 53 | - <script src="../js/jquery.isotope.js"></script> | ||
| 54 | - | ||
| 55 | - <link rel="stylesheet" href="../css/demo.css"> | ||
| 56 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.core.js"></script> | ||
| 57 | - <script src="../js/gb.js"></script> | ||
| 58 | - <script type="text/javascript" src="../js/audioPlayer/jQuery.AudioPlayer.js"></script> | ||
| 59 | - <!-- <script src="../js/gbreplayer.js"></script> --> | ||
| 60 | - | ||
| 61 | - <script src="../js/gbdebug/mode/xml/xml.js"></script> | ||
| 62 | - <script src="../js/gbdebug/mode/javascript/javascript.js"></script> | ||
| 63 | - <script src="../js/gbdebug/mode/css/css.js"></script> | ||
| 64 | - <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script> | ||
| 65 | - <script src="../js/gbdebug/mode/clike/clike.js"></script> | ||
| 66 | - <script src="../js/gbdebug/mode/php/php.js"></script> | ||
| 67 | - <script src="../js/gbdebug/mode/python/python.js"></script> | ||
| 68 | - <style type="text/css"> | ||
| 69 | - #recordzone, | ||
| 70 | - #replayzone{ | ||
| 71 | - display: none; | ||
| 72 | - } | ||
| 73 | - #recordzone.active, | ||
| 74 | - #replayzone.active{ | ||
| 75 | - display: block; | ||
| 76 | - } | ||
| 77 | - </style> | ||
| 78 | -</head> | ||
| 79 | -<body> | ||
| 80 | - <div id="app" class="wrapper"> | ||
| 81 | - <div id="appContainer"> | ||
| 82 | - <div id="appLeft"> | ||
| 83 | - <div class="tree-header">目录</div> | ||
| 84 | - <ul id="folder" class="ztree"></ul> | ||
| 85 | - <div id="handleLM"></div> | ||
| 86 | - </div> | ||
| 87 | - <div id="appMian"> | ||
| 88 | - <div id="appMainHeader"> | ||
| 89 | - <ul id="recordertab" class="nav nav-tabs pull-left"> | ||
| 90 | - <li class="active"><a href="#replayzone" data-toggle="tab"><i class="icon iconfont icon-yulan"></i>播放课程</a></li> | ||
| 91 | - </ul> | ||
| 92 | - <div id="editorwrapper" class="pull-right"> | ||
| 93 | - <div class="btn-group"> | ||
| 94 | - <div id="htmlbutton" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="当前课程环境:Java" data-editorname="html">JAVA</div> | ||
| 95 | - <div class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="JDK版本">JDK 7</div> | ||
| 96 | - </div> | ||
| 97 | - </div> | ||
| 98 | - </div> | ||
| 99 | - <div id="textarea"> | ||
| 100 | - <div id="replayzone" class="active"></div> | ||
| 101 | - </div> | ||
| 102 | - <div id="handleMR"></div> | ||
| 103 | - <div class="pause-shodow hidden"> | ||
| 104 | - <div class="compile-loading"> | ||
| 105 | - <img src="../img/loading.png" alt=""> | ||
| 106 | - </div> | ||
| 107 | - <div class="compile-reslut" style="display: none;"> | ||
| 108 | - <div class="tip-header"> | ||
| 109 | - <span>成功获取编译运行结果</span> | ||
| 110 | - </div> | ||
| 111 | - <div class="tip-content"> | ||
| 112 | - <p>保存编译结果后,播放到此处会在运行区域直接显示结果。需要保存结果后继续录制吗?</p> | ||
| 113 | - </div> | ||
| 114 | - <div class="tip-footer"> | ||
| 115 | - <button class="btn btn-success btn-sm" id="save_compile">保存并继续录制</button> | ||
| 116 | - <button class="btn btn-danger btn-sm" id="cancel_compile">不保存继续录制</button> | ||
| 117 | - </div> | ||
| 118 | - </div> | ||
| 119 | - </div> | ||
| 120 | - </div> | ||
| 121 | - <div id="appRight"> | ||
| 122 | - <div id="resultpanel" class="panel panel-default editor-result"> | ||
| 123 | - <div class="panel-heading result-header"> | ||
| 124 | - <div class="pull-left"> | ||
| 125 | - <div id="compileBtnGroup" class="btn-group"></div> | ||
| 126 | - </div> | ||
| 127 | - <div class="pull-right"> | ||
| 128 | - <a id="full-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="全屏录制" class="btn btn-link"><i class="icon iconfont icon-fangda"></i></a> | ||
| 129 | - <a id="back-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="退出全屏录制" class="btn btn-link" style="display: none;"><i class="icon iconfont icon-fangda"></i></a> | ||
| 130 | - </div> | ||
| 131 | - <div class="btn-group"> | ||
| 132 | - <button type="button" class="btn btn-success" id="play" data-status="0" title="" style="display: none;"><</button> | ||
| 133 | - <!-- <p id="replay">预览录制</p> --> | ||
| 134 | - </div> | ||
| 135 | - <!-- <div class="btn-group pull-right" id="fontendrun"> | ||
| 136 | - <button id="autorun" type="button" class="btn" title="切换自动/手动运行代码" data-placement="bottom" data-autorun="1"></button> | ||
| 137 | - <button id="runnow" type="button" class="btn" title="手动运行代码" data-placement="bottom" disabled="disabled"> | ||
| 138 | - 自动运行 | ||
| 139 | - </button> | ||
| 140 | - </div> --> | ||
| 141 | - </div> | ||
| 142 | - <div class="panel-body hidden" id="cmprun-output"> | ||
| 143 | - <div id="resultoutput"> | ||
| 144 | - <!-- Nav tabs --> | ||
| 145 | - <ul class="nav nav-tabs result-tabs" role="tablist" id="cmprun-tabs"> | ||
| 146 | - <li class="active"><a href="#stdin" role="tab" data-toggle="tab" class="text-warning">标准</a></li> | ||
| 147 | - <li><a href="#cmpinfo" role="tab" data-toggle="tab" class="text-warning">编译</a></li> | ||
| 148 | - <li><a href="#stderr" role="tab" data-toggle="tab" class="text-danger">错误</a></li> | ||
| 149 | - <li><a href="#output" role="tab" data-toggle="tab" class="text-success">结果</a></li> | ||
| 150 | - </ul> | ||
| 151 | - <!-- Tab panes --> | ||
| 152 | - <div class="tab-content"> | ||
| 153 | - <div class="tab-pane active padall15" id="stdin"> | ||
| 154 | - <input type="text" class="form-control" id="runtimeArgus" placeholder="标准输入"> | ||
| 155 | - </div> | ||
| 156 | - <div class="tab-pane padall15" id="cmpinfo"></div> | ||
| 157 | - <div class="tab-pane padall15" id="stderr"></div> | ||
| 158 | - <div class="tab-pane padall15" id="output"></div> | ||
| 159 | - </div> | ||
| 160 | - </div> | ||
| 161 | - </div> | ||
| 162 | - <div class="panel-body" id="ifrcontainer"> | ||
| 163 | - <iframe id="resultiframe" frameBorder="0" width="100%"></iframe> | ||
| 164 | - </div> | ||
| 165 | - </div> | ||
| 166 | - </div> | ||
| 167 | - </div> | ||
| 168 | - <div id="playFooter"> | ||
| 169 | - <div class="" id="audioWrap"> | ||
| 170 | - <button class="play-code" style="display: none;"> | ||
| 171 | - <i class="icon iconfont icon-play"></i> | ||
| 172 | - </button> | ||
| 173 | - </div> | ||
| 174 | -<!-- <div class="playCode"> | ||
| 175 | - <button>开始</button> | ||
| 176 | - </div> --> | ||
| 177 | - </div> | ||
| 178 | - </div> | ||
| 179 | - <!-- --> | ||
| 180 | - <div class="upload-tip" style="display: none;"> | ||
| 181 | - <img src="../img/upload_tip.png" alt=""> | ||
| 182 | - </div> | ||
| 183 | - | ||
| 184 | - | ||
| 185 | - <!-- 准备开始 --> | ||
| 186 | - <div id="countdown" style="display: none;"> | ||
| 187 | - <img src="" alt=""> | ||
| 188 | - </div> | ||
| 189 | - | ||
| 190 | - <!-- 重新开始 --> | ||
| 191 | - <div class="re-tips" style="display: none;"> | ||
| 192 | - <div class="re-reslut"> | ||
| 193 | - <div class="tip-header"> | ||
| 194 | - <span>提示</span> | ||
| 195 | - </div> | ||
| 196 | - <div class="tip-content"> | ||
| 197 | - <p>你确定要重新录制吗?</p> | ||
| 198 | - </div> | ||
| 199 | - <div class="tip-footer"> | ||
| 200 | - <button class="btn btn-success btn-sm" id="re-sure">确定</button> | ||
| 201 | - <button class="btn btn-danger btn-sm" id="re-cancel">取消</button> | ||
| 202 | - </div> | ||
| 203 | - </div> | ||
| 204 | - </div> | ||
| 205 | - | ||
| 206 | - | ||
| 207 | - <script src="../js/recorder/Myna.js"></script> | ||
| 208 | - <script src="../js/recording/recording.js"></script> | ||
| 209 | - | ||
| 210 | - <script> | ||
| 211 | - </script> | ||
| 212 | -</body> | ||
| 213 | -</html> | ||
| 214 | - | ||
| 215 | - | ||
| 216 | - |
src/gxb-ide/Dir.js
| @@ -620,19 +620,19 @@ | @@ -620,19 +620,19 @@ | ||
| 620 | initTrigger(coderecords) | 620 | initTrigger(coderecords) |
| 621 | 621 | ||
| 622 | // fix js执行顺序playTimes没有值 | 622 | // fix js执行顺序playTimes没有值 |
| 623 | - // if(isAndroid){ | ||
| 624 | - // playTimes++ | ||
| 625 | - // } | 623 | + if(isAndroid){ |
| 624 | + playTimes++ | ||
| 625 | + } | ||
| 626 | 626 | ||
| 627 | AudioPlayer(audioUrl) | 627 | AudioPlayer(audioUrl) |
| 628 | 628 | ||
| 629 | var role = getQuery('role'); | 629 | var role = getQuery('role'); |
| 630 | if (role == 0) { | 630 | if (role == 0) { |
| 631 | - // if(!isAndroid){ | 631 | + if(!isAndroid){ |
| 632 | $.AudioPlayer.play() | 632 | $.AudioPlayer.play() |
| 633 | - // }else{ | ||
| 634 | - // playTimes++ | ||
| 635 | - // } | 633 | + }else{ |
| 634 | + playTimes++ | ||
| 635 | + } | ||
| 636 | }else{ | 636 | }else{ |
| 637 | CodingEditer.playCoding(); | 637 | CodingEditer.playCoding(); |
| 638 | } | 638 | } |
| @@ -667,22 +667,22 @@ | @@ -667,22 +667,22 @@ | ||
| 667 | debuggers: false, | 667 | debuggers: false, |
| 668 | allowSeek: false, | 668 | allowSeek: false, |
| 669 | canplayCallback: function(res){ | 669 | canplayCallback: function(res){ |
| 670 | - if (res.status == true && playTimes === 0) { | 670 | + if (res.status == true && playTimes === 0 && !isAndroid) { |
| 671 | CodingEditer.playCoding(); | 671 | CodingEditer.playCoding(); |
| 672 | playTimes++ | 672 | playTimes++ |
| 673 | - alert('canplay !isAndroid ----------- ' + playTimes) | 673 | + // alert('canplay !isAndroid ----------- ' + playTimes) |
| 674 | } | 674 | } |
| 675 | - alert('canplayCallback可以播放 ----------- ' + playTimes) | 675 | + // alert('canplayCallback可以播放 ----------- ' + playTimes) |
| 676 | }, | 676 | }, |
| 677 | onwaitingCallback: function(){ | 677 | onwaitingCallback: function(){ |
| 678 | - alert('onwaitingCallback ----------- ' + playTimes) | 678 | + // alert('onwaitingCallback ----------- ' + playTimes) |
| 679 | }, | 679 | }, |
| 680 | playCallback: function() { // 播放 | 680 | playCallback: function() { // 播放 |
| 681 | if (playTimes != 0) { | 681 | if (playTimes != 0) { |
| 682 | CodingEditer.playCoding(); | 682 | CodingEditer.playCoding(); |
| 683 | // alert('playCoding可以播放 ----------- ' + playTimes) | 683 | // alert('playCoding可以播放 ----------- ' + playTimes) |
| 684 | } | 684 | } |
| 685 | - alert('playCoding可以播放 ----------- ' + playTimes) | 685 | + // alert('playCoding可以播放 ----------- ' + playTimes) |
| 686 | }, | 686 | }, |
| 687 | pauseCallback: function() { // 暂停 | 687 | pauseCallback: function() { // 暂停 |
| 688 | CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); | 688 | CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); |
src/js/audioPlayer/jQuery.AudioPlayer.js
| @@ -239,7 +239,6 @@ | @@ -239,7 +239,6 @@ | ||
| 239 | 239 | ||
| 240 | // When the browser can play audio / 当浏览器可以播放音频时 | 240 | // When the browser can play audio / 当浏览器可以播放音频时 |
| 241 | _this.elements.audioDom.oncanplay = function() { | 241 | _this.elements.audioDom.oncanplay = function() { |
| 242 | - alert('oncanplay') | ||
| 243 | _this.log('oncanplay'); | 242 | _this.log('oncanplay'); |
| 244 | // Determine the audio to load / 判断音频加载完毕 | 243 | // Determine the audio to load / 判断音频加载完毕 |
| 245 | var duration = Math.round(_this.elements.audioDom.duration); | 244 | var duration = Math.round(_this.elements.audioDom.duration); |
| @@ -274,7 +273,6 @@ | @@ -274,7 +273,6 @@ | ||
| 274 | 273 | ||
| 275 | // When the browser is downloading audio / 当浏览器正在下载音频时 | 274 | // When the browser is downloading audio / 当浏览器正在下载音频时 |
| 276 | _this.elements.audioDom.onprogress = function() { | 275 | _this.elements.audioDom.onprogress = function() { |
| 277 | - alert('onprogress') | ||
| 278 | if (_this.elements.audioDom.readyState == 4) { | 276 | if (_this.elements.audioDom.readyState == 4) { |
| 279 | _this.elements.loadProgress.width((_this.elements.audioDom.buffered.end(0) / _this.elements.audioDom.seekable.end(0)) * _this.elements.totalPlayProgress.width()); | 277 | _this.elements.loadProgress.width((_this.elements.audioDom.buffered.end(0) / _this.elements.audioDom.seekable.end(0)) * _this.elements.totalPlayProgress.width()); |
| 280 | } | 278 | } |
| @@ -282,7 +280,6 @@ | @@ -282,7 +280,6 @@ | ||
| 282 | 280 | ||
| 283 | // When the browser begins searching for the audio / 当浏览器开始查找音频时 | 281 | // When the browser begins searching for the audio / 当浏览器开始查找音频时 |
| 284 | _this.elements.audioDom.onloadstart = function() { | 282 | _this.elements.audioDom.onloadstart = function() { |
| 285 | - alert('onloadstart') | ||
| 286 | _this.log('onloadstart'); | 283 | _this.log('onloadstart'); |
| 287 | if(typeof _this.options.onloadstartCallback == 'function'){ | 284 | if(typeof _this.options.onloadstartCallback == 'function'){ |
| 288 | _this.options.onloadstartCallback({'status': true}); | 285 | _this.options.onloadstartCallback({'status': true}); |
| @@ -291,21 +288,18 @@ | @@ -291,21 +288,18 @@ | ||
| 291 | 288 | ||
| 292 | // When the audio has begun or is no longer suspended / 当音频已开始或不再暂停时 | 289 | // When the audio has begun or is no longer suspended / 当音频已开始或不再暂停时 |
| 293 | _this.elements.audioDom.onplay = function() { | 290 | _this.elements.audioDom.onplay = function() { |
| 294 | - alert('onplay') | ||
| 295 | _this.log('onplay'); | 291 | _this.log('onplay'); |
| 296 | _this.elements.playButton.find('img').attr('src', _this.options.imagePath + '/pause.png'); | 292 | _this.elements.playButton.find('img').attr('src', _this.options.imagePath + '/pause.png'); |
| 297 | } | 293 | } |
| 298 | 294 | ||
| 299 | // When the audio has been suspended / 当音频已暂停时 | 295 | // When the audio has been suspended / 当音频已暂停时 |
| 300 | _this.elements.audioDom.onpause = function() { | 296 | _this.elements.audioDom.onpause = function() { |
| 301 | - alert('onpause') | ||
| 302 | _this.log('onpause'); | 297 | _this.log('onpause'); |
| 303 | _this.elements.playButton.find('img').attr('src', _this.options.imagePath + '/play.png'); | 298 | _this.elements.playButton.find('img').attr('src', _this.options.imagePath + '/play.png'); |
| 304 | } | 299 | } |
| 305 | 300 | ||
| 306 | // When the current playlist has ended / 当目前的播放列表已结束时 | 301 | // When the current playlist has ended / 当目前的播放列表已结束时 |
| 307 | _this.elements.audioDom.onended = function() { | 302 | _this.elements.audioDom.onended = function() { |
| 308 | - alert('onended') | ||
| 309 | _this.log('onended'); | 303 | _this.log('onended'); |
| 310 | 304 | ||
| 311 | if(typeof _this.options.endedCallback == 'function'){ | 305 | if(typeof _this.options.endedCallback == 'function'){ |
| @@ -333,7 +327,6 @@ | @@ -333,7 +327,6 @@ | ||
| 333 | } | 327 | } |
| 334 | 328 | ||
| 335 | _this.elements.audioDom.onwaiting = function() { | 329 | _this.elements.audioDom.onwaiting = function() { |
| 336 | - alert('onwaiting') | ||
| 337 | _this.log('onwaiting'); | 330 | _this.log('onwaiting'); |
| 338 | if(typeof _this.options.onwaitingCallback == 'function'){ | 331 | if(typeof _this.options.onwaitingCallback == 'function'){ |
| 339 | _this.options.onwaitingCallback({'status': true}); | 332 | _this.options.onwaitingCallback({'status': true}); |
src/js/player.js
| @@ -35,8 +35,8 @@ $(function(){ | @@ -35,8 +35,8 @@ $(function(){ | ||
| 35 | Dir.isReplayPage = true; | 35 | Dir.isReplayPage = true; |
| 36 | 36 | ||
| 37 | $('.play-code').on('click', function(){ | 37 | $('.play-code').on('click', function(){ |
| 38 | - console.log('=================') | ||
| 39 | - CodingEditer.playCoding(); | 38 | + alert('=================') |
| 39 | + // CodingEditer.playCoding(); | ||
| 40 | CodingEditer.editable(0) | 40 | CodingEditer.editable(0) |
| 41 | }) | 41 | }) |
| 42 | 42 |
src/v1.1/player.html
| @@ -149,13 +149,6 @@ | @@ -149,13 +149,6 @@ | ||
| 149 | <input type="hidden" class="audio-url" value=""> | 149 | <input type="hidden" class="audio-url" value=""> |
| 150 | <div id="playFooter"> | 150 | <div id="playFooter"> |
| 151 | <div class="" id="audioWrap"> | 151 | <div class="" id="audioWrap"> |
| 152 | - <button class="play-code" style="display: none;"> | ||
| 153 | - <img src="../img/play.svg" alt=""> | ||
| 154 | - <!-- <i class="icon iconfont icon-play"></i> --> | ||
| 155 | - </button> | ||
| 156 | - <button class="pause-play-code" style="display: none;"> | ||
| 157 | - <img src="../img/pause.svg" alt=""> | ||
| 158 | - </button> | ||
| 159 | </div> | 152 | </div> |
| 160 | </div> | 153 | </div> |
| 161 | </div> | 154 | </div> |