0

There is a video in the application and I used html tag to play the video in the application. And video is proper working in any android version and iOS below 12 version. But in iOS 12 it's not playing.

<video 
  class="anim-img" height="360px" width="360px" 
  id="receivevideo" src="{{receive.video}}" 
  poster="{{videoThumbnail}}" preload="auto" 
  type="video/mp4" webkit-playsinline playsinline>
</video>

In above code I will get the video url from the webservice which is given in src and for thumbnail of the video I used poster and it is also come from the webservice.

I tried to add "controls" in the video tag which are given in some solutions but still it's not working in iOS 12 and above.

Hiten
  • 724
  • 1
  • 8
  • 23
  • Maybe it helps, if you omit the `px` units from `width` and `height` attributes. They normally only should contain unitless integer values. – yunzen Jul 04 '19 at 07:16
  • By `not working`, what do you mean? Doesn't it show up in the first place? Doesn't it autoload? Did you check, if the video url is correct in your browser's development tool? Did you check, if the video url was loaded in the development tool's network tab? – yunzen Jul 04 '19 at 07:18
  • @yunzen I tried to remove px from height and width and it's not working. And not working means I can see the thumbnail of the video but when I clicked on the play button it's not working. And then I opened the url of the video in browser and the video is playing. – Hiten Jul 04 '19 at 07:27
  • What about the network activity? Is the URL even loaded? – yunzen Jul 04 '19 at 07:36
  • It might be a CORS issue. Is the video coming from the exact same domain? Is it a HTTPS url? – yunzen Jul 04 '19 at 07:37
  • Yes, URL is loaded. And I checked in other device for same URL and video is playing. And not the CORS issue. It is coming from the exact same domain. – Hiten Jul 04 '19 at 07:40
  • Do you use the most recent iOS 12 version? If not, try an update! – yunzen Jul 04 '19 at 07:43
  • Possible duplicate of https://stackoverflow.com/questions/20347352/html5-video-tag-not-working-in-safari-iphone-and-ipad – yunzen Jul 04 '19 at 07:44
  • yes the most recent version. And I tried all the solutions in the given answer but it didn't work for me. – Hiten Jul 04 '19 at 07:46
  • I'm sorry, I cannot help you any further. I don't have the test facilities for iOS 12 – yunzen Jul 05 '19 at 06:56

1 Answers1

0

I turned off the low power mode in iOS device and it worked. The video is working perfectly fine.

But still I need solution if the device is in power mode then how will the video play?

Hiten
  • 724
  • 1
  • 8
  • 23