diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-10-30 12:56:11 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-10-30 12:56:11 -0600 |
| commit | c7277233c8488a887bc9a4c4689d88e7ed42cc80 (patch) | |
| tree | 69ab5169aa26f1ff421e7bec49ef508cdd5f4456 /lib | |
| parent | 73067abce52d978221a6e2b4619b86179b5f603d (diff) | |
prefer option over attribute to control end behavior of wistia video (loop or reset, mutually exclusive)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/converter/html5.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb index 48ca4db8..9b9febe4 100644 --- a/lib/asciidoctor/converter/html5.rb +++ b/lib/asciidoctor/converter/html5.rb @@ -1101,13 +1101,13 @@ Your browser does not support the audio tag. end delimiter = ['?'] start_anchor = (node.attr? 'start') ? %(#{delimiter.pop || '&'}time=#{node.attr 'start'}) : '' - loop_param = (node.attr? 'loopBehavior') ? %(#{delimiter.pop || '&'}endVideoBehavior=#{node.attr 'loopBehavior'}) : '' + end_video_behavior_param = (node.option? 'loop') ? %(#{delimiter.pop || '&'}endVideoBehavior=loop) : ((node.option? 'reset') ? %(#{delimiter.pop || '&'}endVideoBehavior=reset) : '') target = (node.attr 'target') autoplay_param = (node.option? 'autoplay') ? %(#{delimiter.pop || '&'}autoPlay=true) : '' muted_param = (node.option? 'muted') ? %(#{delimiter.pop || '&'}muted=true) : '' %(<div#{id_attribute}#{class_attribute}>#{title_element} <div class="content"> -<iframe#{width_attribute}#{height_attribute} src="#{asset_uri_scheme}//fast.wistia.com/embed/iframe/#{target}#{start_anchor}#{autoplay_param}#{loop_param}#{muted_param}" frameborder="0"#{(node.option? 'nofullscreen') ? '' : (append_boolean_attribute 'allowfullscreen', xml)} class="wistia_embed" name="wistia_embed"></iframe> +<iframe#{width_attribute}#{height_attribute} src="#{asset_uri_scheme}//fast.wistia.com/embed/iframe/#{target}#{start_anchor}#{autoplay_param}#{end_video_behavior_param}#{muted_param}" frameborder="0"#{(node.option? 'nofullscreen') ? '' : (append_boolean_attribute 'allowfullscreen', xml)} class="wistia_embed" name="wistia_embed"></iframe> </div> </div>) else |
