From da81c0d7807901da7d868cb3ff118bdc4bc24cf3 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Tue, 5 Sep 2023 18:16:45 +0200 Subject: [PATCH 1/2] player support and videojs --- wp-hyperaudio/hyperaudio.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/wp-hyperaudio/hyperaudio.php b/wp-hyperaudio/hyperaudio.php index f93b684..446713a 100644 --- a/wp-hyperaudio/hyperaudio.php +++ b/wp-hyperaudio/hyperaudio.php @@ -3,7 +3,7 @@ * Plugin Name: Official Hyperaudio Plugin * Plugin URI: https://hyper.audio * Description: Hyperaudio Interactive Transcript Player -* Version: 1.0.12 +* Version: 1.0.13 * Author: Mark Boas * Author URI: http://hyper.audio **/ @@ -34,6 +34,7 @@ function hyperaudio_shortcode_handler($atts, $transcript, $tag) $trackLabel = "English"; $webmonetization = false; $showActive = false; + $player = NULL; if (isset($atts['src'])) $src = $atts['src']; if (isset($atts['width'])) $width = $atts['width']; @@ -52,6 +53,9 @@ function hyperaudio_shortcode_handler($atts, $transcript, $tag) if (isset($atts['webmonetization'])) $webmonetization = $atts['webmonetization']; if (isset($atts['show-active'])) $showActive = $atts['show-active']; + if (isset($atts['player'])) $player = $atts['player']; + + $transcript = preg_replace( "/\r|\n/", "", $transcript); @@ -64,6 +68,10 @@ function hyperaudio_shortcode_handler($atts, $transcript, $tag) if (is_null($transcriptid)) { $transcriptid = "hypertranscript".$id; } + + if (strtolower($player) == 'videojs') { + $o .=''; + } $o .='