What are some potential challenges of automatically playing videos on a website using PHP?

One potential challenge of automatically playing videos on a website using PHP is that it can negatively impact the user experience by consuming unnecessary bandwidth and potentially causing annoyance to visitors. To address this issue, you can provide users with the option to manually play the video or implement a feature that only plays the video when it is in the viewport.

<video controls autoplay>
  <source src="video.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>