javascript - HTML video no image, just sound -


all solutions found didn't take me further, hope can me in issue.

i have embedded html5 video in simple site. working except in safari versions (eg. 8.0), sounds plays, no images shown. video shows after resizing browser window.

i have 3 full screen divs displayed via javascript on scpecific events.

  1. first div "introscreen" shows on page load
  2. div "videoscreen" video shows on click
  3. third div shows after video has finished

i works except bug in safari. here link site: www.whereintimeisnewman.com/temp_index.php

here function, displays , plays video:

function playvideo(){      document.getelementbyid("introscreen").style.display = "none";     document.getelementbyid("videoscreen").style.display = "block";      video.play();     video.addeventlistener('ended',function(){               changetoregistration();     }); }   

maybe has css display settings, how solve that?

thank looking this!

solution:

i managed solve issue. apparently safari has problem videos , "display: none" style attribute.

the parent div "videoscreen" had css-attribute display:none, script turned display:block when starting video.

document.getelementbyid("videoscreen").style.display = "block"; video.play(); 

when disabling line in css-sheet, video loaded. though div displayed beginning, video , poster-image show once video being played.

maybe solution helps else...


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -