I used video.js and video tag to play video in web browsers and it plays my video well. However, when web browser app goes background or i try changing tab, it stops video playback. Is there any tag or attributes or script i should use? I would take any replies with pleasure. Thank you.
<html>
<head>
<link href="https://vjs.zencdn.net/7.3.0/video-js.min.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/7.3.0/video.min.js"></script>
<style>
</style>
</head>
<body>
<video
id="my-player"
class="video-js"
data-setup="{}">
<source src="[MY VIDEO LINK]" type="application/x-mpegURL"></source>
</video>
<script>
videojs('my-player', {
controls: true,
autoplay: true,
preload: 'auto',
});
</script>
</body>
</html>