index.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>wavesurfer.js | Regions</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. <!-- plugins -->
  15. <script src="../../dist/plugin/wavesurfer.timeline.js"></script>
  16. <script src="../../dist/plugin/wavesurfer.regions.js"></script>
  17. <script src="../../dist/plugin/wavesurfer.minimap.js"></script>
  18. <!-- App -->
  19. <script src="../trivia.js"></script>
  20. <script src="app.js"></script>
  21. </head>
  22. <body itemscope itemtype="http://schema.org/WebApplication">
  23. <div class="container">
  24. <div class="header">
  25. <ul class="nav nav-pills pull-right">
  26. <li><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
  27. </ul>
  28. <h1 itemprop="name">wavesurfer.js Regions</h1>
  29. </div>
  30. <div id="demo">
  31. <div id="waveform">
  32. <!-- Here be waveform -->
  33. </div>
  34. <div class="controls">
  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>
  44. <div class="row marketing">
  45. <p>
  46. <pre><code>var wavesurfer = WaveSurfer.create({
  47. container: document.querySelector('#waveform'),
  48. waveColor: '#A8DBA8',
  49. progressColor: '#3B8686',
  50. backend: 'MediaElement',
  51. plugins: [
  52. WaveSurfer.regions.create{
  53. regions: [
  54. {
  55. start: 1,
  56. end: 3,
  57. color: 'hsla(400, 100%, 30%, 0.5)'
  58. }, {
  59. start: 5,
  60. end: 7,
  61. color: 'hsla(200, 50%, 70%, 0.4)'
  62. }
  63. ],
  64. dragSelection: {
  65. slop: 5
  66. }
  67. })
  68. ]
  69. });
  70. </code></pre>
  71. </p>
  72. </div>
  73. <div class="footer row">
  74. <div class="col-sm-12">
  75. <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>
  76. </div>
  77. <div class="col-sm-8">
  78. <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 <a rel="license" href="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause License</a>.
  79. </div>
  80. <div class="col-sm-4">
  81. <p>
  82. The sound file is from <a href="https://librivox.org/librivox-multilingual-short-works-collection-001-by-various/">librivox.org</a>.
  83. </p>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="github-fork-ribbon-wrapper right">
  88. <div class="github-fork-ribbon">
  89. <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a>
  90. </div>
  91. </div>
  92. <script>
  93. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  94. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  95. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  96. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  97. ga('create', 'UA-50026819-1', 'wavesurfer.fm');
  98. ga('send', 'pageview');
  99. </script>
  100. </body>
  101. </html>