What is the problem with video tag and HTML5, i can start videos but seek does not work from subdomain on smartphone, when i try in browser and PS all working fine
This is working fine, and seeking working here, but when i change src for video files to subdomain, video is start but seeking not working
<video id="videoPlayer"
src="1.mp4"
style="width:720px; height:440px;"
controls="controls"
type="video/mp4"
onClick="this.play();">
</video>
EDIT: Its not working from my storage server, where is installed lighttpd... from subdomain where is apache seek working fine
try the following code if it helps:
<video id="video player"
width="720"
height="440" controls>
<source src="1.mp4" type="video/mp4" onClick=this.play()>
</video>
Hope this helps out
Related
I have added a video to my site. Added code for autoplay in the video. It works fine on Firefox, but not auto playing in Chrome.
Here is the code I have added to show the video:
<video id="vid" autoplay="autoplay" loop="loop" width="100%" height="100%">
<source src="https://example.com/video.mp4" type="video/mp4" />
</video>
Also, when I face the issue, I searched for this and found a script. Here is what I have tried:
<script>
document.getElementById('vid').play();
</script>
But still, the video just below menu is not auto-playing on Chrome.
I have checked the Chrome autoplay guidelines and my video is not violating that. I have a muted video but still not auto playing.
Any workaround for that?
Thank you in advance.
If think you need to add playsinline autoplay muted loop into you'r video tag.
autostart="false"
<video id="vid" autoplay="false" loop="loop" width="100%" height="100%">
<source src="https://example.com/video.mp4" type="video/mp4" />
</video>
or
https://www.groovypost.com/howto/disable-autoplay-videos-on-sites-in-google-chrome/
try this
If you want auto play option on then make this and your chrome browser should be upper than 4.0 then this code will work.
I've a list of video's in a page. The videos are fetched from Server via Rest API and are used in html as below. The first video plays well but later video's wont play. The resolution are same for all video. This works well in other browsers and platform.
<video width="645" height="425" id="myvideo" class ='video' controls controlsList="nodownload">
<source id="source" src="" type="video/mp4">
</video>
In my source tag, I've mentioned type="video/mp4"
In JS Side I do the below
$("#source")[0].src = <path-to-the-video>;
This works great on all browers and platform except for windows 7 and ie 11.
The error I get is
MEDIA12899: AUDIO/VIDEO: Unknown MIME type.
I've checked over the net
to add the type="video/mp4" which is already there and does not solve the problem.
The video resolutions are correct because the same video works in the same IE and Window when played in a separate HTML file.
What am I missing?
Error Screen Shot
Same Video working in same browser when added to a html file
<video width="645" height="425" class="video" id="myvideo" style="display: inline-block;" controls="" controlslist="nodownload">
<source id="source" src="http://hostname.com1/video2" type="video/mp4">
</video>
Screenshot
I'm developing a site in which I want to play video in background. Following is my code, video is playing in Internet explorer but not in Chrome. I'm using 2.2.4 version of jquery and I cannot change it because my all site is developed and If I change jquery than my whole site stops working.
<video id="vid" width="110%" height="100%" autoplay controls loop muted="muted">
<source src="../img/led.mp4" type="video/mp4" />
</video>
Thanx in advance.
I don't understand, I have a project with Angular2 and in my home component, I try to display a video with html5. The problem is that sometimes, on some videos, the tag doesn't play sound:
<div class="video-gallery">
<video id="video" controls preload="auto" width="640" height="420" poster="assets/imgs/video_logo.png" >
<source src="assets/videos/{{videos[0].name + videos[0].extension}}" type="video/mp4" />
</video>
</div>
When I say 'on some videos' I mean it's not up to the extension, some videos are mp4 and play sound and others (mp4) don't. Same thing for mkv for example. I only get the video but no sound. What could be the problem ? I work with Chrome's last version so I don't think it's from chrome because it is supposed to support video and sound of html5 . Can it be from the video tag ?
Thanks
<video autobuffer controls autoplay>
<source id="mp4" src="../vid/coolvideo.mp4" type="video/mp4">
</video>
Is there anyway to autoplay a .mp4 video file on page load for iPhone and Android Smart Mobile Devices. The above works great in the browser, but struggles hard on smart mobile. Is there any other HTML5 or even If I must JS solutions for iPhone (without loading a bloated third-party resource, ideally). Plain javaScript or plain jQuery, HTML5 solutions ideal.
It works only if you add muted and playsinline attributes
<video autoplay playsinline muted loop>
<source src="cover.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
Check this link
which says:"autoplay is disabled to prevent unsolicited cellular download"