Note that there are some explanatory texts on larger screens.

plurals
  1. POiDevice onclick not playing video with current code
    primarykey
    data
    text
    <p>My ultimate goal is to have on iDevices viewing my website, an image link that on click, plays a video at full screen, and upon finish of video redirects to another webpage. I am open to any solution that achieves my goal, even if it means scrapping the code I've got. </p> <p>Here is my best attempt as of yet: This is <a href="http://www.atxcloud.com/wp-content/uploads/Panos/beerdiaries/RnD/aredirect/redirecttest.html" rel="nofollow noreferrer">My current testing site</a></p> <p>I was following <a href="https://stackoverflow.com/questions/10724897/html5-video-on-android-4-play-fullscreen-then-redirect-to-another-webpage-not">this stackoverflow post</a></p> <p>I am happy with the results on my laptop [<strong>edit</strong> works on Chrome but not FF 16.0.1 sigh I don't know anymore), but I am currently unable to click the image to play the video on my iDevices (ipad1 &amp; iphone4). I've spent hours attempt to achieve this by researching, trial &amp; error to no prevail. </p> <p>Here is the code I am working with:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;meta name="viewport" content="width=device-width; initial-scale=1.0" /&gt; &lt;meta name="description" content="" /&gt; &lt;title&gt;test&lt;/title&gt; &lt;script type="text/javascript"&gt; function videoEnd() { var video = document.getElementById("video"); video.webkitExitFullScreen(); document.location = "http://www.atxcloud.com/wp-content/uploads/Panos/beerdiaries/jk5%20all/build.html"; } function playVideo() { var video = document.getElementById("video"); video.addEventListener('ended', videoEnd, true); video.webkitEnterFullScreen(); video.load(); video.play(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;video id="video" poster="http://www.atxcloud.com/wp-content/uploads/Panos/beerdiaries/RnD/image.png" onclick="playVideo();"&gt; &lt;source src="http://www.atxcloud.com/wp-content/uploads/Panos/beerdiaries/RnD/video.mp4" type="video/mp4" /&gt; &lt;/video&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    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.
 

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