原生js实现浏览器端录制麦克风声音录音播放并下载效果代码

代码语言:html

所属分类:多媒体

代码描述:原生js实现浏览器端录制麦克风声音录音播放并下载效果代码

代码标签: 麦克风 录音 播放 下载

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width">



    <style>
        @import 'https://fonts.googleapis.com/icon?family=Material+Icons|Roboto';
        
        body {
          background: #fff;
          font-family: 'Roboto Light';
        }
        
        body,
        html {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        
        * {
            outline: none;
        }
        
        .recorder_wrapper {
            width: 100%;
            display: -webkit-flex;
            display: -moz-flex;
            display: -ms-flex;
            display: -o-flex;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }
        
        .recorder {
            display: inline-block;
            text-align: center;
            width: 500px;
            max-width: 100%;
        }
        
        .record_btn {
            width: 100px;
            height: 100px;
            font-family: 'Material Icons';
            font-size: 48px;
            color: #e74c3c;
            background: none;
            border: 2px solid #e74c3c;
            border-radius: 50%;
            cursor: pointer;
            transition: 0.15s linear;
        }
        
        .record_btn:hover {
            transition: 0.15s linear;
            transform: scale( 1.05 );
        }
        
        .record_btn:active {
            background: #f5f5f5;
        }
        
        .record_btn:after {
            content: '\E029';
        }
        
        .record_btn[disa.........完整代码请登录后点击上方下载按钮下载查看

网友评论0