newcoder1010 Posted October 20, 2016 Share Posted October 20, 2016 Hi, I created a drupal html block. When I go to my page, I see the video with white background. How can I have the video image? <video width="400" controls> <source src="sites/default/files/videos/1.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> Link to comment Share on other sites More sharing options...
Ingolme Posted October 20, 2016 Share Posted October 20, 2016 Check to see whether the video format is supported by the browser you're using: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility Link to comment Share on other sites More sharing options...
newcoder1010 Posted October 20, 2016 Author Share Posted October 20, 2016 I have IE, Chrome, Firefox - none of them worked. It worked in microsoft edge only. Is there way I can make it work in all browsers? Link to comment Share on other sites More sharing options...
Ingolme Posted October 20, 2016 Share Posted October 20, 2016 Do you know what format your video is? It seems that the format that has the widest compatibility among browsers is H.264 video and MP3 audio in an MP4 container. Link to comment Share on other sites More sharing options...
dsonesuk Posted October 20, 2016 Share Posted October 20, 2016 Try preload="auto" or preload="metadata" Link to comment Share on other sites More sharing options...
Gregson Posted October 20, 2016 Share Posted October 20, 2016 Check to see whether the video format is supported by the browser you're using: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility I also need some css help this site http://prowriterz.com Link to comment Share on other sites More sharing options...
newcoder1010 Posted October 20, 2016 Author Share Posted October 20, 2016 I simply have file.mp4 in my c drive. I tried with auto and metadata. No luck. Link to comment Share on other sites More sharing options...
newcoder1010 Posted October 21, 2016 Author Share Posted October 21, 2016 Any help please? Link to comment Share on other sites More sharing options...
dsonesuk Posted October 21, 2016 Share Posted October 21, 2016 What I suggested is supposed with preload="auto" load the whole file and the first frame is shown, the other option is to use poster="urltoimage" where you can use a actual image as background for video. Link to comment Share on other sites More sharing options...
newcoder1010 Posted October 21, 2016 Author Share Posted October 21, 2016 (edited) I tried with the below code. No luck. I tried to upload image but I get this error " You have exceeded your allotted disk space for attachments" https://drive.google.com/file/d/0B7xIEuVi005ycE9pWGhtRWtOdWc/view?usp=sharing <video width="320" height="240" controls poster="W34.png"> // i get image but video problem remain same <source src="11.mp4" type="video/mp4"> </video> <video width="320" height="240" controls preload="auto" > <source src="11.mp4" type="video/mp4"> </video> Edited October 21, 2016 by newcoder1010 Link to comment Share on other sites More sharing options...
dsonesuk Posted October 21, 2016 Share Posted October 21, 2016 Do the videos from w3schools example, work or not? <video width="400" controls> <source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> Link to comment Share on other sites More sharing options...
newcoder1010 Posted October 21, 2016 Author Share Posted October 21, 2016 It works in every browser. Looks like problem with my video file. I simply have some videos from my galaxy phone and downloaded to my computer. Then I uploaded to my hosting server. File has mp4 extension. Link to comment Share on other sites More sharing options...
dsonesuk Posted October 21, 2016 Share Posted October 21, 2016 Well it could have been corrupted during download or upload, try it again, or if it runs from desktop, use windows movie editor to save as mp4 but in a different quality. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now