Skip to content

Commit 6704c3d

Browse files
committed
Add transcript-div to shortcode; document other changes.
Fixes #3
1 parent 154b0bf commit 6704c3d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/ableplayer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
433433
'subtitles' => '',
434434
'descriptions' => '',
435435
'chapters' => '',
436+
'transcript-div' => '',
436437
'autoplay' => 'false',
437438
'preload' => 'metadata',
438439
'loop' => 'false',
@@ -602,6 +603,9 @@ function ableplayer_shortcode( $atts, $content = null ) {
602603
if ( ! empty( $all_atts['vimeo-desc-id'] ) ) {
603604
$o .= ' data-vimeo-desc-id="' . esc_attr( $all_atts['vimeo-desc-id'] ) . '"';
604605
}
606+
if ( ! empty( $all_atts['transcript-div'] ) ) {
607+
$o .= ' data-transcript-div="' . esc_attr( $all_atts['transcript-div'] ) . '"';
608+
}
605609
$o .= '>' . PHP_EOL;
606610

607611
$o .= "\t" . $source;

src/readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The `[ableplayer]` shortcode supports the following attributes.
5959
* `chapters` - Attachment ID or URL to `.vtt` chapters file. Optional pipe separator for language code and label.
6060
* `descriptions` - Attachment ID or URL to `.vtt` audio descriptions file. Optional pipe separator for language code and label.
6161
* `youtube-desc-id` - YouTube URL or ID of a described version of the video
62+
* `youtube-sign-src` - YouTube URL or ID of a sign language interpreted accompanying video
6263
* `vimeo-desc-id` - Vimeo URL or ID of a described version of the video
6364

6465
All captions, subtitles, chapters, and descriptions tracks must be in `.vtt` format. The shortcode only supports a single set of values for each type of data; to add multiple tracks of the same type you can use the Video block or add custom HTML.
@@ -85,6 +86,7 @@ By default, the language will be your WordPress installation language, with the
8586
* `volume` - "0" to "10" (default is "7" to avoid overpowering screen reader audio). Some browsers do not support this.
8687
* `seekinterval` - number of seconds to forward/rewind with the Forward and Rewind buttons. If omitted, the interval will be intelligently assigned based on length of the video.
8788
* `nowplaying` - "true" or "false" to include a "Selected Track" section within the media player (default is "false").
89+
* `transcript-div` - ID attribute of a target element that will contain the video transcript
8890
* `id` - a unique id for the player (if omitted, one will be automatically assigned)
8991

9092
== Examples ==

0 commit comments

Comments
 (0)