index.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>wavesurfer.js | Timeline plugin</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="//katspaugh.github.io/wavesurfer.js/example/screenshot.png" />
  12. <!-- wavesurfer.js -->
  13. <script src="../../dist/wavesurfer.js"></script>
  14. <!-- timeline format renderer -->
  15. <script src="../../dist/plugin/wavesurfer.timeline.js"></script>
  16. <!-- App -->
  17. <script src="app.js"></script>
  18. <script src="../trivia.js"></script>
  19. </head>
  20. <body itemscope itemtype="http://schema.org/WebApplication">
  21. <div class="container">
  22. <div class="header">
  23. <noindex>
  24. <ul class="nav nav-pills pull-right">
  25. <li><a href="?fill">Fill</a></li>
  26. <li><a href="?scroll">Scroll</a></li>
  27. </ul>
  28. </noindex>
  29. <h1 itemprop="name"><a href="http://wavesurfer-js.org">wavesurfer.js</a><noindex> + Timeline</noindex></h1>
  30. </div>
  31. <div id="demo">
  32. <div id="waveform">
  33. <div class="progress progress-striped active" id="progress-bar">
  34. <div class="progress-bar progress-bar-info"></div>
  35. </div>
  36. <!-- Here be waveform -->
  37. </div>
  38. <div id="wave-timeline"></div>
  39. <div class="controls">
  40. <button class="btn btn-primary" data-action="play">
  41. <i class="glyphicon glyphicon-play"></i>
  42. Play
  43. /
  44. <i class="glyphicon glyphicon-pause"></i>
  45. Pause
  46. </button>
  47. </div>
  48. </div>
  49. <div class="row marketing">
  50. <div class="col-lg-4">
  51. <h4>wavesurfer.js Timeline Plugin</h4>
  52. <p itemprop="about">Adds a simple timeline to your <strong>wavesurfer.js</strong> instances.</p>
  53. <p>
  54. <a class="btn btn-large btn-success" href="../../plugin/wavesurfer.timeline.js" itemprop="downloadUrl" download>Download the plugin</a>
  55. </p>
  56. </div>
  57. <div class="col-lg-8">
  58. <h4>Quick Start</h4>
  59. <noindex><p>
  60. <pre><code>var wavesurfer = WaveSurfer.create({
  61. // your options here
  62. plugins: [
  63. WaveSurfer.timeline.create{
  64. container: "#wave-timeline"
  65. })
  66. ]
  67. });
  68. wavesurfer.load('example/media/demo.mp3');</code></pre>
  69. </p></noindex>
  70. <br />
  71. <h4>Options</h4>
  72. <ul class="markdown-body">
  73. <li><code>container</code> - <em>required</em> - the element in which to place the timeline, or a CSS selector to find it</li>
  74. <li><code>height</code> - the height (in pixels) of the timeline. The default is 20.</li>
  75. <li><code>notchPercentHeight</code> - the height (in percent) of the minor notch lines in the timeline. The default is 90.</li>
  76. <li><code>primaryColor</code> - the color of the modulo-ten notch lines (e.g. 10sec, 20sec). The default is '#000'.</li>
  77. <li><code>secondaryColor</code> - the color of the non-modulo-ten notch lines. The default is '#c0c0c0'.</li>
  78. <li><code>primaryFontColor</code> - the color of the non-modulo-ten time labels (e.g. 10sec, 20sec). The default is '#000'.</li>
  79. <li><code>primaryFontColor</code> - the color of the non-modulo-ten time labels (e.g. 5sec, 15sec). The default is '#c0c0c0'.</li>
  80. <li><code>timeInterval</code> - number of intervals that records consists of. Usually it is equal to the duration in minutes. (Integer or function which receives pxPerSec value and reurns value)</li>
  81. <li><code>primaryLabelInterval</code> - number of primary time labels. (Integer or function which receives pxPerSec value and reurns value)</li>
  82. <li><code>secondaryLabelInterval</code> - number of secondary time labels (Time labels between primary labels, integer or function which receives pxPerSec value and reurns value).</li>
  83. <li><code>formatTimeCallback</code> - custom time format callback. (Function which receives number of seconds and returns formatted string)</li>
  84. </ul>
  85. </div>
  86. </div>
  87. <div class="footer row">
  88. <div class="col-sm-12">
  89. <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>
  90. </div>
  91. <div class="col-sm-12">
  92. <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>.
  93. </div>
  94. </div>
  95. </div>
  96. <div class="github-fork-ribbon-wrapper right">
  97. <div class="github-fork-ribbon">
  98. <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a>
  99. </div>
  100. </div>
  101. <script>
  102. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  103. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  104. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  105. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  106. ga('create', 'UA-50026819-1', 'wavesurfer.fm');
  107. ga('send', 'pageview');
  108. </script>
  109. </body>
  110. </html>