Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to Show Poster image on video ends using Jquery?
    primarykey
    data
    text
    <p>My HTML5 Video Control API got a shape. But now the client asks me to show Poster once video played.</p> <p>Now there is a dark black background.</p> <p>Please let me know how I have to do that.</p> <pre><code>&lt;video width="640" height="360" x-webkit-airplay="allow" poster="asserts/poster.png" preload="" tabindex="0" class="video1"&gt; &lt;source data-quality="sd" src="http://media.jilion.com/videos/demo/midnight_sun_sv1_360p.mp4"&gt;&lt;/source&gt; &lt;source data-quality="hd" src="http://media.jilion.com/videos/demo/midnight_sun_sv1_720p.mp4"&gt;&lt;/source&gt; &lt;source data-quality="sd" src="http://media.jilion.com/videos/demo/midnight_sun_sv1_360p.webm"&gt;&lt;/source&gt; &lt;source data-quality="hd" src="http://media.jilion.com/videos/demo/midnight_sun_sv1_720p.webm"&gt;&lt;/source&gt; &lt;/video&gt; </code></pre> <p>And the Jquery funciton for play/ pause is:</p> <pre><code>/* Play/Pause */ var gPlay = function() { if($hdVideo.attr('paused') == false) { $hdVideo[0].pause(); $video_main_control.removeClass("hd-video-main-control-none"); $hdVideo[0].poster.show(); } else { $hdVideo[0].play(); $video_main_control.addClass("hd-video-main-control-none"); } }; $video_main_control.click(gPlay); $hd_play_btn.click(gPlay); $hdVideo.click(gPlay); $hdVideo.bind('play', function() { $hd_play_btn.addClass('hd-paused-button'); }); $hdVideo.bind('pause', function() { $hd_play_btn.removeClass('hd-paused-button'); }); $hdVideo.bind('ended', function() { $hd_play_btn.removeClass('hd-paused-button'); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload