You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Self-documenting array of AblePlayer attributes.
89
+
*
90
+
* @return array
91
+
*/
92
+
functionable_player_parameters() {
93
+
/**
94
+
* 'default': Default value in shortcode.
95
+
* 'description': Explanation of field and value expected.
96
+
* 'parameter': Parameter to use in output if not `data-{key}`.
97
+
* 'options': Available options if fixed choices available. (If only one, checkbox input; multiple, select).
98
+
*/
99
+
$params = array(
100
+
'id' => array(
101
+
'default' => ableplayer_get_unique_id(),
102
+
'description' => __( 'Automatically generated unique ID for an Able Player shortcode.', 'ableplayer' ),
103
+
),
104
+
'allow-fullscreen' => array(
105
+
'default' => '',
106
+
'description' => __( 'If set to “false” the player will not include a fullscreen button', 'ableplayer' ),
107
+
'options' => array( 'false' ),
108
+
),
109
+
'autoplay' => array(
110
+
'default' => 'false',
111
+
'description' => __( 'Play media automatically when page loads. For accessibility reasons, this is not recommended unless user is sure to expect media to automatically start.', 'ableplayer' ),
112
+
'parameter' => 'autoplay',
113
+
'options' => array( 'true' ),
114
+
),
115
+
'captions-position' => array(
116
+
'default' => 'below',
117
+
'description' => __( 'Specify default position of captions relative to the video. Users can override this.', 'ableplayer' ),
118
+
'options' => array( 'below', 'overlay' ),
119
+
),
120
+
'heading' => array(
121
+
'default' => '',
122
+
'description' => __( 'Able Player injects an off-screen HTML heading “Media Player” at the top of the player so screen reader users can easily find the player. It automatically assigns a heading level that is one level deeper than the closest parent heading. This attribute can be used to manually set the heading level.', 'ableplayer' ),
'description' => __( 'Height of the video in pixels. Defaults to height of container.', 'ableplayer' ),
128
+
'parameter' => 'height',
129
+
),
130
+
'hidecontrols' => array(
131
+
'default' => '',
132
+
'description' => __( 'Hide controls during playback. Controls are visibly hidden but still accessible to assistive technologies. Controls reappear if user presses any key or moves the mouse over the video player region.', 'ableplayer' ),
133
+
'parameter' => 'data-hide-controls',
134
+
'options' => array( 'true' ),
135
+
),
136
+
'lang' => array(
137
+
'default' => '',
138
+
'description' => __( 'Specify language of the player using 2-character language code. Default "en" for English.', 'ableplayer' ),
139
+
),
140
+
'loop' => array(
141
+
'default' => '',
142
+
'description' => __( 'Loops and plays the media file repeatedly.', 'ableplayer' ),
143
+
'parameter' => 'loop',
144
+
'options' => array( 'true' ),
145
+
),
146
+
'nowplaying' => array(
147
+
'default' => '',
148
+
'description' => __( 'Include “Selected track” section within player; only applies when a playlist is present.', 'ableplayer' ),
149
+
'parameter' => 'data-show-now-playing',
150
+
'options' => array( 'true' ),
151
+
),
152
+
'playsinline' => array(
153
+
'default' => 'true',
154
+
'description' => __( 'Instructs supporting browsers to play the video “inline” within the web page. This is especially applicable on iPhones, which by default load the video in their own built-in video player.', 'ableplayer' ),
155
+
'parameter' => 'playsinline',
156
+
'options' => array( 'false' ),
157
+
),
158
+
'poster' => array(
159
+
'default' => '',
160
+
'description' => __( 'Path to an image file. Will be displayed in the player until the video is played.', 'ableplayer' ),
161
+
'parameter' => 'poster',
162
+
),
163
+
'preload' => array(
164
+
'default' => 'auto',
165
+
'description' => __( 'Tells the browser how much media to download when the page loads.', 'ableplayer' ),
166
+
'parameter' => 'preload',
167
+
'options' => array( 'auto', 'metadata' ),
168
+
),
169
+
'seekinterval' => array(
170
+
'default' => '',
171
+
'description' => __( 'Interval (in seconds) of forward and rewind buttons. By default, seek interval is intelligently calculated based on duration of the media.', 'ableplayer' ),
172
+
'parameter' => 'data-seek-interval',
173
+
),
174
+
'sign-src' => array(
175
+
'default' => '',
176
+
'description' => __( 'A path pointing to a synchronized sign language version of the video.', 'ableplayer' ),
177
+
),
178
+
'skin' => array(
179
+
'default' => '2020',
180
+
'description' => __( 'The default skin has two rows of controls, with the seekbar positioned in available space within the top row. The “2020” skin, introduced in version 4.2, has all buttons in one row beneath a full-width seekbar.', 'ableplayer' ),
181
+
'options' => array( '2020', 'legacy' ),
182
+
),
183
+
'speed' => array(
184
+
'default' => 'animals',
185
+
'description' => __( 'The default setting uses a turtle icon for slower and a rabbit icon for faster. Setting this to “arrows” uses arrows pointing up for faster and down for slower.', 'ableplayer' ),
186
+
'parameter' => 'data-speed-icons',
187
+
'options' => array( 'animals', 'arrows' ),
188
+
),
189
+
'steno-mode' => array(
190
+
'default' => '',
191
+
'description' => __( 'Allow keyboard shortcuts for controlling the player remotely within textarea form fields.', 'ableplayer' ),
192
+
'options' => array( 'true' ),
193
+
),
194
+
'start' => array(
195
+
'default' => '',
196
+
'description' => __( 'Time at which you want the media to start playing.', 'ableplayer' ),
197
+
'parameter' => 'data-start-time',
198
+
),
199
+
'transcript-div' => array(
200
+
'default' => '',
201
+
'description' => __( 'ID of a custom div in which to display an interactive transcript.', 'ableplayer' ),
202
+
),
203
+
'transcript-src' => array(
204
+
'default' => '',
205
+
'description' => __( 'ID of an external div that contains a pre-existing manually coded transcript. Able Player will parse this transcript and interact with it during playback', 'ableplayer' ),
206
+
),
207
+
'include-transcript' => array(
208
+
'default' => '',
209
+
'description' => __( 'Set to “false” to exclude transcript button from controller.', 'ableplayer' ),
210
+
'options' => array( 'true' ),
211
+
),
212
+
'transcript-title' => array(
213
+
'default' => '',
214
+
'description' => __( 'Override default transcript title (default is “Transcript”, or “Lyrics” if the data-lyrics-mode attribute is present)', 'ableplayer' ),
215
+
),
216
+
'lyrics-mode' => array(
217
+
'default' => '',
218
+
'description' => __( 'Forces a line break between and within captions in the transcript.', 'ableplayer' ),
219
+
'options' => array( 'true' ),
220
+
),
221
+
'chapters-div' => array(
222
+
'default' => '',
223
+
'description' => __( 'ID of an external div in which to display a list of chapters. The list of chapters is generated automatically if a chapters track is available in a WebVTT file. If this attribute is not provided and chapter are available, chapters will be displayed in a popup menu triggered by the Chapters button.', 'ableplayer' ),
224
+
),
225
+
'use-chapters-button' => array(
226
+
'default' => '',
227
+
'description' => __( 'Set to “false” to exclude chapters button from controller.', 'ableplayer' ),
228
+
'options' => array( 'false' ),
229
+
),
230
+
'chapters-title' => array(
231
+
'default' => '',
232
+
'description' => __( 'Override default chapters title (default is “Chapters”)', 'ableplayer' ),
233
+
),
234
+
'chapters-default' => array(
235
+
'default' => '',
236
+
'description' => __( 'ID of default chapter (must correspond with the text or value immediately above the timestamp in your chapter’s WebVTT file). If this attribute is present, the media will be advanced to this start time.', 'ableplayer' ),
237
+
),
238
+
'seekbar-scope' => array(
239
+
'default' => '',
240
+
'description' => __( 'Default is “video” (seekbar represents full duration of video); if set to “chapter” seekbar represents the duration of the current chapter only', 'ableplayer' ),
241
+
'options' => array( 'chapter' ),
242
+
),
243
+
'search' => array(
244
+
'default' => '',
245
+
'description' => __( 'Search terms to search for within the caption tracks, separated by a space.', 'ableplayer' ),
246
+
),
247
+
'search-lang' => array(
248
+
'default' => '',
249
+
'description' => __( '2-character language code of caption or subtitle track to search.', 'ableplayer' ),
250
+
),
251
+
'search-div' => array(
252
+
'default' => '',
253
+
'description' => __( 'ID of external container in which to display search results', 'ableplayer' ),
254
+
),
255
+
'vimeo-id' => array(
256
+
'default' => '',
257
+
'description' => __( 'ID of a video on Vimeo.', 'ableplayer' ),
258
+
),
259
+
'vimeo-desc-id' => array(
260
+
'default' => '',
261
+
'description' => __( 'ID of an alternate described version of a video on Vimeo', 'ableplayer' ),
262
+
),
263
+
'width' => array(
264
+
'default' => '',
265
+
'description' => __( 'Width of the video in pixels.', 'ableplayer' ),
266
+
'param' => 'width',
267
+
),
268
+
'volume' => array(
269
+
'default' => '7',
270
+
'description' => __( 'Set the default volume from 0 to 10; default is 7 to avoid overpowering screen reader audio)', 'ableplayer' ),
0 commit comments