Commit b9336060c0bcb297d0b637615947a3c1a5dbdb7f

Authored by ykxie
1 parent 8c447d60

add tip

src/css/recording.css
... ... @@ -181,6 +181,23 @@
181 181 transform: translate(-50%);
182 182 bottom: 0;
183 183 cursor: pointer; }
  184 + .record-before .error {
  185 + width: 360px;
  186 + height: 340px;
  187 + background: url("../img/know.png") no-repeat;
  188 + position: relative;
  189 + margin: 16px auto;
  190 + z-index: 999; }
  191 + .record-before .error-btn {
  192 + width: 100px;
  193 + height: 62px;
  194 + background: url("../img/know-btn.png") no-repeat;
  195 + background-size: 100%;
  196 + position: absolute;
  197 + left: 50%;
  198 + transform: translate(-50%);
  199 + bottom: 0;
  200 + cursor: pointer; }
184 201 .record-before #countdown {
185 202 position: absolute;
186 203 top: 0;
... ...
src/img/know-btn.png 0 → 100644

7.48 KB

src/img/know.png 0 → 100644

54.3 KB

src/index.html
... ... @@ -253,9 +253,12 @@
253 253 </div>
254 254  
255 255 <div class="record-before">
256   - <div class="tip">
  256 + <div class="tip" style="display: none;">
257 257 <a class="start-btn"></a>
258 258 </div>
  259 + <div class="error" style="display: none;">
  260 + <a class="error-btn"></a>
  261 + </div>
259 262 <!-- 倒计时 -->
260 263 <div id="countdown">
261 264 <img src="" alt="">
... ...
src/js/gbreplayer.js
... ... @@ -1931,6 +1931,7 @@ $(function(){
1931 1931 if(document.URL.indexOf('index.htm') >= 0){
1932 1932 HZRecorder.get(function(rec) {
1933 1933 var seconds = 0;
  1934 + $('.tip').show();
1934 1935 $('.start-btn').click(function(){
1935 1936 console.log("开始录制")
1936 1937 $('.tip').hide();
... ...
src/js/recorder/Myna.js
... ... @@ -298,6 +298,10 @@
298 298 callback(rec);
299 299 },
300 300 function(error) {
  301 + $('.error').css('display', 'block');
  302 + $('.error-btn').click(function(){
  303 + $('.error').hide();
  304 + })
301 305 switch (error.code || error.name) {
302 306 case 'PERMISSION_DENIED':
303 307 case 'PermissionDeniedError':
... ...
src/scss/recording.scss
... ... @@ -240,6 +240,25 @@
240 240 bottom: 0;
241 241 cursor: pointer;
242 242 }
  243 + .error{
  244 + width: 360px;
  245 + height: 340px;
  246 + background: url('../img/know.png') no-repeat;
  247 + position: relative;
  248 + margin: 16px auto;
  249 + z-index: 999
  250 + }
  251 + .error-btn{
  252 + width: 100px;
  253 + height: 62px;
  254 + background: url('../img/know-btn.png') no-repeat;
  255 + background-size: 100%;
  256 + position: absolute;
  257 + left: 50%;
  258 + transform: translate(-50%);
  259 + bottom: 0;
  260 + cursor: pointer;
  261 + }
243 262  
244 263 #countdown{
245 264 position: absolute;
... ...