0

I would like to include a video on a website. I have done this quite normal with the HTML5 tag.

<video id="video_3e2f4515" src="discovervideo.mp4" playsinline poster="./previewvideo.jpg" controls="controls" type="video/mp4">

Dein Browser unterstützt das Videoformat leider nicht.

Unfortunately, the video (about 2 minutes) can not play completely in Safari Browser (iPhone), since the screen timeout comes. There are no problems with Android. I have already tried different approaches. Once nosleep.js and another video (videojs) player, but none of it works. Each time the device times out. Is there a way to work around that?

Thank you in advance and best regards

inseljohn
  • 1
  • 1
  • What do you mean with screen timeout? Do you mean that the video plays and the phone actually 'locks', which basically means it is switched off? – Peter Branforn Aug 03 '18 at 17:11
  • Yes, right! I mean the normal mobile phone display timeout. First the display dimms for a few seconds and then it switch off. It must be possible somehow, because I can watch videos e.g. on newssites completely. Thanks in advance – inseljohn Aug 04 '18 at 06:50
  • nobody can help? – inseljohn Aug 09 '18 at 15:45

1 Answers1

0

Ok, given the answers you gave me in the comments, this is basically unrelated to the browser. The app that loads your browser view needs to be telling the iOS that it should lock the screen when it is in the foreground.

For this (how to do this) checkout this answer given to a related question in stack overflow:

How to prevent screen lock on my application with swift on IOS

I am not sure what you are using as an application to show your browser view. If you are using a framework, it will provide a similar named option for your application for sure!

Peter Branforn
  • 1,679
  • 3
  • 17
  • 29