/config/forms/remote.php

https://github.com/AzuraCast/AzuraCast · PHP · 202 lines · 180 code · 22 blank · 0 comment · 0 complexity · 3bec36f18b513401aa653ded2fc0bd30 MD5 · raw file

  1. <?php
  2. use App\Entity\StationRemote;
  3. return [
  4. 'groups' => [
  5. 'basic_info' => [
  6. 'use_grid' => true,
  7. 'elements' => [
  8. 'is_visible_on_public_pages' => [
  9. 'toggle',
  10. [
  11. 'label' => __('Show on Public Pages'),
  12. 'description' => __('Enable to allow listeners to select this relay on this station\'s public pages.'),
  13. 'selected_text' => __('Yes'),
  14. 'deselected_text' => __('No'),
  15. 'default' => true,
  16. 'form_group_class' => 'col-sm-12',
  17. ],
  18. ],
  19. 'type' => [
  20. 'radio',
  21. [
  22. 'label' => __('Remote Station Type'),
  23. 'required' => true,
  24. 'choices' => [
  25. App\Radio\Adapters::REMOTE_SHOUTCAST1 => 'SHOUTcast v1',
  26. App\Radio\Adapters::REMOTE_SHOUTCAST2 => 'SHOUTcast v2',
  27. App\Radio\Adapters::REMOTE_ICECAST => 'Icecast v2.4+',
  28. ],
  29. 'form_group_class' => 'col-sm-12',
  30. ],
  31. ],
  32. 'display_name' => [
  33. 'text',
  34. [
  35. 'label' => __('Display Name'),
  36. 'description' => __('The display name assigned to this relay when viewing it on administrative or public pages. Leave blank to automatically generate one.'),
  37. 'form_group_class' => 'col-md-6',
  38. ],
  39. ],
  40. 'url' => [
  41. 'text',
  42. [
  43. 'label' => __('Remote Station Listening URL'),
  44. 'description' => __(
  45. 'Example: if the remote radio URL is %s, enter <code>%s</code>.',
  46. 'http://station.example.com:8000/radio.mp3',
  47. 'http://station.example.com:8000'
  48. ),
  49. 'required' => true,
  50. 'form_group_class' => 'col-md-6',
  51. ],
  52. ],
  53. 'mount' => [
  54. 'text',
  55. [
  56. 'label' => __('Remote Station Listening Mountpoint/SID'),
  57. 'description' => __(
  58. 'Specify a mountpoint (i.e. <code>%s</code>) or a Shoutcast SID (i.e. <code>%s</code>) to specify a specific stream to use for statistics or broadcasting.',
  59. '/radio.mp3',
  60. '2'
  61. ),
  62. 'form_group_class' => 'col-md-6',
  63. ],
  64. ],
  65. 'admin_password' => [
  66. 'text',
  67. [
  68. 'label' => __('Remote Station Administrator Password'),
  69. 'description' => __('To retrieve detailed unique listeners and client details, an administrator password is often required.'),
  70. 'form_group_class' => 'col-md-6',
  71. ],
  72. ],
  73. 'enable_autodj' => [
  74. 'toggle',
  75. [
  76. 'label' => __('Broadcast AutoDJ to Remote Station'),
  77. 'description' => __('If enabled, the AutoDJ on this installation will automatically play music to this mount point.'),
  78. 'selected_text' => __('Yes'),
  79. 'deselected_text' => __('No'),
  80. 'default' => 0,
  81. 'form_group_class' => 'col-sm-12',
  82. ],
  83. ],
  84. ],
  85. ],
  86. 'autodj' => [
  87. 'use_grid' => true,
  88. 'legend' => __('Configure AutoDJ Broadcasting'),
  89. 'class' => 'fieldset_autodj',
  90. 'elements' => [
  91. 'autodj_format' => [
  92. 'radio',
  93. [
  94. 'label' => __('AutoDJ Format'),
  95. 'choices' => [
  96. StationRemote::FORMAT_MP3 => 'MP3',
  97. StationRemote::FORMAT_OGG => 'OGG Vorbis',
  98. StationRemote::FORMAT_AAC => 'AAC+ (MPEG4 HE-AAC v2)',
  99. ],
  100. 'default' => StationRemote::FORMAT_MP3,
  101. 'form_group_class' => 'col-md-6',
  102. ],
  103. ],
  104. 'autodj_bitrate' => [
  105. 'radio',
  106. [
  107. 'label' => __('AutoDJ Bitrate (kbps)'),
  108. 'choices' => [
  109. 32 => '32',
  110. 48 => '48',
  111. 64 => '64',
  112. 96 => '96',
  113. 128 => '128',
  114. 192 => '192',
  115. 256 => '256',
  116. 320 => '320',
  117. ],
  118. 'default' => 128,
  119. 'form_group_class' => 'col-md-6',
  120. ],
  121. ],
  122. 'source_port' => [
  123. 'text',
  124. [
  125. 'label' => __('Remote Station Source Port'),
  126. 'description' => __('If the port you broadcast to is different from the one you listed in the URL above, specify the source port here.'),
  127. 'form_group_class' => 'col-md-6',
  128. ],
  129. ],
  130. 'source_mount' => [
  131. 'text',
  132. [
  133. 'label' => __('Remote Station Source Mountpoint/SID'),
  134. 'description' => __('If the mountpoint (i.e. <code>/radio.mp3</code>) or Shoutcast SID (i.e. <code>2</code>) you broadcast to is different from the one listed above, specify the source mount point here.'),
  135. 'form_group_class' => 'col-md-6',
  136. ],
  137. ],
  138. 'source_username' => [
  139. 'text',
  140. [
  141. 'label' => __('Remote Station Source Username'),
  142. 'description' => __('If you are broadcasting using AutoDJ, enter the source username here. This may be blank.'),
  143. 'form_group_class' => 'col-md-6',
  144. ],
  145. ],
  146. 'source_password' => [
  147. 'text',
  148. [
  149. 'label' => __('Remote Station Source Password'),
  150. 'description' => __('If you are broadcasting using AutoDJ, enter the source password here.'),
  151. 'form_group_class' => 'col-md-6',
  152. ],
  153. ],
  154. 'is_public' => [
  155. 'toggle',
  156. [
  157. 'label' => __('Publish to "Yellow Pages" Directories'),
  158. 'description' => __('Enable to advertise this mount point on "Yellow Pages" public radio directories.'),
  159. 'selected_text' => __('Yes'),
  160. 'deselected_text' => __('No'),
  161. 'default' => false,
  162. 'form_group_class' => 'col-md-6',
  163. ],
  164. ],
  165. ],
  166. ],
  167. 'grp_submit' => [
  168. 'elements' => [
  169. 'submit' => [
  170. 'submit',
  171. [
  172. 'type' => 'submit',
  173. 'label' => __('Save Changes'),
  174. 'class' => 'ui-button btn-lg btn-primary',
  175. ],
  176. ],
  177. ],
  178. ],
  179. ],
  180. ];