Video is not playing in the server but playing local in iPad? - ios

I am using html5 <video> tag to play a video in the iPad/iPhone its playing good in local but when i update to the server i am just getting the play icon and its stuck there itself.
<video controls="true" preload id=videoContainer>
<source src=video/abc.mp4 type=video/mp4>
<source src=video/abc.ogg type=video/ogg>
<source src=video/abc.webm type=video/webm>
Your browser does not support the video tag.
</video>

Create .htaccess and added the following lines in it
AddType video/ogg .ogv
AddType video/mp4 .mp4

Related

iOS 14.4.2 seems to disable video autoplay

I've noticed that with the recent update to iOS 14.4.2, all of my autoplay video stopped autoplaying. Everything worked just fine on the previous version. This goes for HTML 5 videos, as well as vimeo embeds with their player.js. I've checked other websites using HTML 5, which used to previously work, and all of their videos stopped autoplaying.
With HTML, I'm using the code below to autoplay:
<video autoplay="" muted="" loop="" playsinline="" id="hosting-video">
<source src="LINK" type="video/mp4">
</video>
For Vimeo, I'm using this code:
<iframe src="LINK?background=1&autoplay=1&loop=1&byline=0&title=0" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" allow="autoplay" muted="muted" data-ready="true"></iframe>
I couldn't find anything on this online. Is anyone else experiecing this on iOS 14.4.2? If so, is there anything I can do to play video automatically?
If anyone's wondering, the videos work just fine. Apparently, enabling battery saver on iphone disables autoplay videos.
Try replacing autoplay and playsInline with below code :
autoPlay='autoplay' playsInline='playsinline'
Hope, it works for you.

Geting Safari browsers to autoplay videos?

I have a Rails 5.2.2 app that displays a short video sequence with autoplay. The sound track has been removed from the video.
<body>
<div>
<header>
<video autoplay loop muted playsinline>
<source src="/assets/.../my_video.mp4" type="video/mp4">
</video>
</header>
</div>
</body>
The video autoplays nicely from Chrome, Firefox and Safari on mobile. But in MacOS Safari browsers it does not.
This previously accepted answer suggests that muting this video should be enough, but it seems not to be in my case. A middleware change has also been suggested, but the answer is 6 years old and is labeled as prove-of-concept only.
Changing the above video tag to:
<video autoplay loop muted playsinline poster="/assets/.../my_video.mp4">
...
</video>
seems to fix the problem, but I am having a hard time understanding why, and understanding if I really did solve the problem. I don't understand which of the two references that actually makes the video play. Could anyone explain?
Your original HTML5 looks fine and the test video below is tested and auto playing in MacOS 11.1 and safari 14.0.2.
<body>
<div>
<header>
<video autoplay loop muted playsinline>
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4
" type="video/mp4">
</video>
</header>
</div>
</body>
The autoplay rules can change over time so it is worth checking you have a recent version of both the OS and Safari.
If your video still fails to autoplay then it may be some issue with the video itself, or if your framework is generating the code with the final generated HTML5 code. If the problem persists, it would be worth adding the final browser source for the video div if possible.

playsinline not working for video on iOS?

I have a site that uses a video with the following code:
<video class="hero-video-actual" autoplay loop muted playsinline>
<source src="/content/video.mp4" type="video/mp4">
</video>
I need the video to autoplay on iOS. It autoplays just fine on Android and desktop, but not iOS. I'm not sure why. Everything I see online says that if you use the playsinline attribute, you should be good. But it's not working for me, and I know of no way to inspect the browser console in iOS.
You need to edit your Code like this:
<video
class="hero-video-actual"
autoplay
loop
muted
playsinline
src="/content/video.mp4"
type="video/mp4">
</video>
the "src-path" dont need a own tag, you should include it in the <video> tag

html5 videos not playing on iOS devices

I have an issue with playing my html5 videos on iOS devices, namely iPhone 7.0 and iPad 7.0.4 currently the iPad is showing just the empty container and on iPhone it has the play button with a line through it. What could this mean?
I've put the following in the .htaccess file -
AddType video/ogg .ogg
AddType video/mp4 .mp4
AddType video/webm .webm
Any ideas why this is happening?
Thanks!
I used to integrate mp4-videos this way:
<video src="path/to/file.mp4" poster="thumbnail.jpg" type="video/mp4" width="640" controls autobuffer />
My videos are MP4/H.264, Baseline profile, 480×360
Never had an issue with this. Maybe the path to your video isn't correct.

How can I play local video file (inbuilt my apps) in iPhone using cordova 2.5

I want to play local video file (like .mp4) in my iPhone apps. I can play youtube video file but I need play local storage file (myVideo.mp4) in my 'www' folder. How is it possible in iPhone7 using cordova 2.5? I am using html 5 video tag but unable to launch local video on my iPhone 7 device.
First you just put a normal video tag into your html page:
<video id="video" controls>
<source src="media/video/video.mp4" type="video/mp4"></source>
</video>
The video physical path is "www/media/video/video.mp4". Next ensure you have allowed video playback in the config.xml:
<preference name="AllowInlineMediaPlayback" value="true"/>
That's should be all.

Resources