Spythonian
Spythonian

Reputation: 197

HTML5 Video API is not showing videos but producing sound

I am building a Web Application with Laravel. I want to add a video to a particular section using HTML5 video API, the video is only playing sound but not showing. This is my code below

<video controls width="450" height="300" autoplay="false">   
    <source src="{{ asset('site/videos/iUOL Welcome Video.mp4') }}" type="video/mp4">
    <source src="{{ asset('site/videos/iUOL Welcome Video.flv') }}" type="video/flv">
    Sorry, your browser doesn't support embedded videos.
</video>

I have tested it on Chromium, Firefox and Chrome all the same.

Upvotes: 0

Views: 165

Answers (3)

Keval Garala
Keval Garala

Reputation: 316

Have you checked your css? Here issue is in your style sheet.

If the video is sounding then it's working fine in autoplay mode.

<div class="video">
// Add your code here.
</div>

Css should be:

.video{
     display: inline-block;
     width: 100% !important;
 }

Upvotes: 0

Prashant Deshmukh.....
Prashant Deshmukh.....

Reputation: 2292

Check if your video is properly encoded, then only it will support HTML5 video tag.

HTML5 video need MP4 videos with H264 video codec and AAC audio codec.

Convert your video mp4 file to H.264 encoding and check.

Upvotes: 1

sisaln
sisaln

Reputation: 220

Have you tried to remove the spaces from the video name?

Upvotes: 0

Related Questions