79386744

Date: 2025-01-25 12:57:58
Score: 1
Natty:
Report link

A HTML-only approach could work in your case, as well.
Assumptions:

  1. the code showcased in the question is not inside a eventHandler
  2. you want the HTML to handle video source at page load

The best reference is here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#using_the_media_attribute_with_video

Note: Avoid parsing markup through JS as it is considered insecure.

Reasons:
  • Whitelisted phrase (-1): in your case
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Webber Delver