index.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>wavesurfer.js | Zoom Example</title>
  6. <link href="data:image/gif;" rel="icon" type="image/x-icon" />
  7. <!-- Bootstrap -->
  8. <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
  9. <link rel="stylesheet" href="../css/style.css" />
  10. <link rel="stylesheet" href="../css/ribbon.css" />
  11. <link rel="screenshot" itemprop="screenshot" href="https://katspaugh.github.io/wavesurfer.js/example/screenshot.png" />
  12. <!-- wavesurfer.js -->
  13. <script src="../../dist/wavesurfer.js"></script>
  14. <script src="../../dist/plugin/wavesurfer.timeline.js"></script>
  15. <script src="../../dist/plugin/wavesurfer.regions.js"></script>
  16. <!-- Demo -->
  17. <script src="main.js"></script>
  18. </head>
  19. <body itemscope itemtype="http://schema.org/WebApplication">
  20. <div class="container">
  21. <div class="header">
  22. <ul class="nav nav-pills pull-right">
  23. <li><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
  24. </ul>
  25. <h1 itemprop="name">Zooming Feature Example</h1>
  26. </div>
  27. <div id="demo">
  28. <div id="waveform">
  29. <!-- Here be the waveform -->
  30. </div>
  31. <div id="timeline"></div>
  32. <div class="controls">
  33. <div class="row">
  34. <div class="col-sm-7">
  35. <button class="btn btn-primary" data-action="play">
  36. <i class="glyphicon glyphicon-play"></i>
  37. Play
  38. /
  39. <i class="glyphicon glyphicon-pause"></i>
  40. Pause
  41. </button>
  42. </div>
  43. <div class="col-sm-1">
  44. <i class="glyphicon glyphicon-zoom-in"></i>
  45. </div>
  46. <div class="col-sm-3">
  47. <input data-action="zoom" type="range" min="1" max="200" value="0" style="width: 100%" />
  48. </div>
  49. <div class="col-sm-1">
  50. <i class="glyphicon glyphicon-zoom-out"></i>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="row marketing">
  56. <h3>How to Zoom</h3>
  57. <hr />
  58. <p>
  59. <pre><code>var wavesurfer = WaveSurfer.create({
  60. container: document.querySelector('#wave'),
  61. backend: 'MediaElement'
  62. });
  63. document.querySelector('#slider').oninput = function () {
  64. wavesurfer.zoom(Number(this.value));
  65. };
  66. </code></pre>
  67. </p>
  68. </div>
  69. <div class="footer row">
  70. <div class="col-sm-12">
  71. <a rel="license" href="https://opensource.org/licenses/BSD-3-Clause"><img alt="BSD-3-Clause License" style="border-width:0" src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" /></a>
  72. </div>
  73. <div class="col-sm-7">
  74. <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">wavesurfer.js</span> by <a href="https://github.com/katspaugh/wavesurfer.js">katspaugh</a> is licensed under a&nbsp;<a style="white-space: nowrap" rel="license" href="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause License</a>.
  75. </div>
  76. <div class="col-sm-5">
  77. <div class="pull-right">
  78. <noindex>
  79. The audio file is from <a rel="nofollow" href="http://spokencorpora.ru/">spokencorpora.ru</a>, used with permission.
  80. </noindex>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="github-fork-ribbon-wrapper right">
  86. <div class="github-fork-ribbon">
  87. <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a>
  88. </div>
  89. </div>
  90. <script>
  91. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  92. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  93. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  94. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  95. ga('create', 'UA-50026819-1', 'wavesurfer.fm');
  96. ga('send', 'pageview');
  97. </script>
  98. </body>
  99. </html>