index.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>wavesurfer.js | HTML initialisation API 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/wavesurfer-html-init.js"></script>
  15. </head>
  16. <body itemscope itemtype="http://schema.org/WebApplication">
  17. <div class="container">
  18. <div class="header">
  19. <ul class="nav nav-pills pull-right">
  20. <li><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
  21. </ul>
  22. <h1 itemprop="name">HTML initialisation API</h1>
  23. </div>
  24. <p class="marketing">
  25. Using the HTML initialisation script and the HTML attribute API is a quick way of creating wavesurfer instances.
  26. </p>
  27. <div id="demo">
  28. <section class="marketing">
  29. <wavesurfer
  30. data-url="../media/demo.wav"
  31. data-plugins="regions"
  32. data-regions-regions='[{"start": 1,"end": 3,"color": "hsla(400, 100%, 30%, 0.5)"}, {"start": 5,"end": 7,"color": "hsla(200, 50%, 70%, 0.4)"}]'
  33. >
  34. </wavesurfer>
  35. <pre><code>&lt;wavesurfer
  36. data-url="../media/demo.wav"
  37. data-plugins="regions"
  38. data-regions-regions='[{"start": 1,"end": 3,"color": "hsla(400, 100%, 30%, 0.5)"}, {"start": 5,"end": 7,"color": "hsla(200, 50%, 70%, 0.4)"}]'
  39. >
  40. &lt;/wavesurfer>
  41. </code></pre>
  42. </section>
  43. <hr />
  44. <section class="marketing">
  45. <wavesurfer
  46. data-url="../media/demo.wav"
  47. data-plugins="minimap,timeline"
  48. data-minimap-height="30"
  49. data-minimap-wave-color="#ddd"
  50. data-minimap-progress-color="#999"
  51. data-timeline-font-size="13px"
  52. data-timeline-container="#timeline"
  53. >
  54. </wavesurfer>
  55. <div id="timeline"></div>
  56. <pre><code>&lt;wavesurfer
  57. data-url="../media/demo.wav"
  58. data-plugins="minimap,timeline"
  59. data-minimap-height="30"
  60. data-minimap-wave-color="#ddd"
  61. data-minimap-progress-color="#999"
  62. data-timeline-font-size="13px"
  63. data-timeline-container="#timeline"
  64. >
  65. &lt;/wavesurfer>
  66. &lt;div id="timeline">&lt;/div>
  67. </code></pre>
  68. </section>
  69. </div>
  70. <div class="footer row">
  71. <div class="col-sm-12">
  72. <a rel="license" href="https://creativecommons.org/licenses/by/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/80x15.png" /></a>
  73. </div>
  74. <div class="col-sm-7">
  75. <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 xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/katspaugh/wavesurfer.js" property="cc:attributionName" rel="cc:attributionURL">katspaugh</a> is licensed under a&nbsp;<a style="white-space: nowrap" rel="license" href="https://creativecommons.org/licenses/by/3.0/deed.en_US">Creative Commons Attribution 3.0 Unported License</a>.
  76. </div>
  77. <div class="col-sm-5">
  78. <div class="pull-right">
  79. <noindex>
  80. The audio file is from <a rel="nofollow" href="http://spokencorpora.ru/">spokencorpora.ru</a>, used with permission.
  81. </noindex>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="github-fork-ribbon-wrapper right">
  87. <div class="github-fork-ribbon">
  88. <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a>
  89. </div>
  90. </div>
  91. <script>
  92. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  93. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  94. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  95. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  96. ga('create', 'UA-50026819-1', 'wavesurfer.fm');
  97. ga('send', 'pageview');
  98. </script>
  99. </body>
  100. </html>