title: HTML5 Video - Pause at the Last Frame
body: <p>I'm using a full background HTML5 video for the header of my Wordpress website and would like it to freeze at the last frame of the video, instead of cutting to a black background as it's doing currently.</p>
  
  <pre><code>if(strpos($video_image, "http://") !== false || strpos($video_image, "https://") !== false){
              $video_image_src = $video_image;
          } else {
              $video_image_src = wp_get_attachment_image_src($video_image, 'full');
              $video_image_src = $video_image_src[0];
          }
  
          //$poster_markup = (!empty($video_image)) ? 'poster="'.$video_image_src.'"' : null ;
          $poster_markup = null;
          $video_markup = null;
  
          $video_markup .=  '&lt;div class="video-color-overlay" data-color="'.$bg_color.'"&gt;&lt;/div&gt;';
  
  
          $video_markup .= '
  
          &lt;div class="mobile-video-image" style="background-image: url('.$video_image_src.')"&gt;&lt;/div&gt;
          &lt;div class="nectar-video-wrap" data-bg-alignment="'.$bg_position.'"&gt;
  
  
              &lt;video class="nectar-video-bg" width="1800" height="700" '.$poster_markup.'  preload="auto" autoplay&gt;';
                  if(!empty($video_webm)) { $video_markup .= '&lt;source type="video/webm" src="'.$video_webm.'"&gt;'; }
                  if(!empty($video_mp4)) { $video_markup .= '&lt;source type="video/mp4" src="'.$video_mp4.'"&gt;'; }
                  if(!empty($video_ogv)) { $video_markup .= '&lt;source type="video/ogg" src="'. $video_ogv.'"&gt;'; }
  
             $video_markup .='&lt;/video&gt;
  
          &lt;/div&gt;';
  
          echo $video_markup;
      }
  </code></pre>
  
  <p>In the video class I've already removed the loop that was there, that's left me with the video going directly to a black screen once it ends.</p>
  
  <p>Any help on how to get it to pause on the last frame would be greatly appreciated, Thanks!</p>