'Showing video on bootstrap modal Angular using iFrame

If anyone could help me with this. I've been struggling for a few days. I'm trying to open a video using the bootstrap modal. I am showing the video on the home page. When I start the application or when I do a reload it works properly, but if I change the component to the About page or something else, when I go back to the modal it opens a dialog, but only with a white background and the video does not start.

<div class="container-xxl py-5 px-0 wow fadeInUp" data-wow-delay="0.1s">
  <div class="row g-0">
      <div class="col-md-12">
          <div class="video">
              <button type="button" class="btn-play" data-bs-toggle="modal" data-src="assets/video.mp4" data-bs-target="#videoModal">
                  <span></span>
              </button>
          </div>
      </div>
  </div>
</div>
<div class="modal fade" id="videoModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
      <div class="modal-content rounded-0">
          <div class="modal-body">
              <!-- 16:9 aspect ratio -->
              <div class="ratio ratio-16x9">
                  <iframe class="embed-responsive-item" src="" id="video" allowfullscreen allowscriptaccess="always"
                      allow="autoplay"></iframe>
              </div>
          </div>
      </div>
  </div>
</div>


Solution 1:[1]

had this same problem w/mingw. got libpthreadGC2.a from ftp://sourceware.org/pub/pthreads-win32/dll-latest/lib/x86/, put it in C;\mingw\lib and renamed it to libpthread.a. i didn't know gcc's -l switch means "apprend 'lib' to the front and '.a' to the back" e.g. -lpthread = libpthread.a

Solution 2:[2]

Make sure that the pthread library is in the library search path of the linker.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 schizotybalt
Solution 2 Vijay Mathew