Turn audio into a shareable video. forked from nypublicradio/audiogram

themeOptions.js 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. module.exports = [
  2. {
  3. 'name': 'Metadata',
  4. 'options': [
  5. {
  6. 'name': 'name',
  7. 'type': 'text',
  8. 'help': 'The name of the theme.'
  9. }
  10. ]
  11. },
  12. {
  13. 'name': 'Movie',
  14. 'options': [
  15. {
  16. 'name': 'width',
  17. 'type': 'number',
  18. 'help': 'Desired video width in pixels.'
  19. },
  20. {
  21. 'name': 'height',
  22. 'type': 'number',
  23. 'help': 'Desired video height in pixels.'
  24. },
  25. {
  26. 'name': 'framesPerSecond',
  27. 'type': 'number',
  28. 'help': 'Desired video framerate.'
  29. },
  30. {
  31. 'name': 'samplesPerFrame',
  32. 'type': 'number',
  33. 'help': 'How many data points to use for the waveform. More points = a more detailed wave. (e.g. 128)'
  34. },
  35. {
  36. 'name': 'maxDuration',
  37. 'type': 'number',
  38. 'help': 'Maximum duration of an audiogram, in seconds (e.g. set this to 30 to enforce a 30-second time limit).'
  39. }
  40. ]
  41. },
  42. {
  43. 'name': 'Background',
  44. 'note': 'You can set both a Background Color and a Background Image, in which case the image will be drawn on top of the color.',
  45. 'options': [
  46. {
  47. 'name': 'backgroundImage',
  48. 'type': 'select',
  49. 'help': 'What image to put in the background of every frame, it should be a file in settings/backgrounds/',
  50. 'options': []
  51. },
  52. {
  53. 'name': 'backgroundColor',
  54. 'type': 'color',
  55. 'help': 'A CSS color to fill the background of every frame (e.g. pink or #ff00ff).'
  56. }
  57. ]
  58. },
  59. {
  60. 'name': 'Caption',
  61. 'note': 'If both Caption Top and Caption Bottom are set, the caption will be roughly vertically centered between them, give or take a few pixels depending on the font.',
  62. 'options': [
  63. {
  64. 'name': 'captionColor',
  65. 'type': 'color',
  66. 'help': 'A CSS color, what color the text should be (e.g. red or #ffcc00).'
  67. },
  68. {
  69. 'name': 'captionAlign',
  70. 'type': 'select',
  71. 'help': 'Text alignment of the caption.',
  72. 'options': [
  73. 'left',
  74. 'right',
  75. 'center'
  76. ]
  77. },
  78. {
  79. 'name': 'captionFont',
  80. 'type': 'text',
  81. 'help': 'A full CSS font definition to use for the caption. ([weight] size \'family\').'
  82. },
  83. {
  84. 'name': 'captionLineHeight',
  85. 'type': 'number',
  86. 'help': 'How tall each caption line is in pixels. You\'ll want to adjust this for whatever font and font size you\'re using.'
  87. },
  88. {
  89. 'name': 'captionLineSpacing',
  90. 'type': 'number',
  91. 'help': 'How many extra pixels to put between caption lines. You\'ll want to adjust this for whatever font and font size you\'re using.'
  92. },
  93. {
  94. 'name': 'captionLeft',
  95. 'type': 'number',
  96. 'help': 'How many pixels from the left edge to place the caption'
  97. },
  98. {
  99. 'name': 'captionRight',
  100. 'type': 'number',
  101. 'help': 'How many pixels from the right edge to place the caption'
  102. },
  103. {
  104. 'name': 'captionBottom',
  105. 'type': 'number',
  106. 'help': 'How many pixels from the bottom edge to place the caption.'
  107. },
  108. {
  109. 'name': 'captionTop',
  110. 'type': 'number',
  111. 'help': 'How many pixels from the top edge to place the caption.'
  112. }
  113. ]
  114. },
  115. {
  116. 'name': 'Wave',
  117. 'options': [
  118. {
  119. 'name': 'pattern',
  120. 'type': 'select',
  121. 'help': 'What waveform shape to draw.',
  122. 'options': [
  123. 'wave',
  124. 'bars',
  125. 'line',
  126. 'curve',
  127. 'roundBars',
  128. 'pixel',
  129. 'bricks',
  130. 'equalizer'
  131. ]
  132. },
  133. {
  134. 'name': 'waveTop',
  135. 'type': 'number',
  136. 'help': 'How many pixels from the top edge to start the waveform.'
  137. },
  138. {
  139. 'name': 'waveBottom',
  140. 'type': 'number',
  141. 'help': 'How many pixels from the top edge to end the waveform.'
  142. },
  143. {
  144. 'name': 'waveLeft',
  145. 'type': 'number',
  146. 'help': 'How many pixels from the left edge to start the waveform.'
  147. },
  148. {
  149. 'name': 'waveRight',
  150. 'type': 'number',
  151. 'help': 'How many pixels from the right edge to start the waveform.'
  152. },
  153. {
  154. 'name': 'waveColor',
  155. 'type': 'color',
  156. 'help': 'A CSS color, what color the wave should be.'
  157. }
  158. ]
  159. }
  160. ];