Home > Enterprise >  React video tag keeps playing the video in loop. How can i stop it?
React video tag keeps playing the video in loop. How can i stop it?

Time:07-25

          <video width="100%" height="100%" controls>
            <source
              src={course?.courseAttachments?.attachmentUrl}
              type="video/mp4"
            />
          </video>
        </div>

I have tried adding different attributes but the video starts again when it finishes running

CodePudding user response:

did you try adding loop="false" attribute ?

CodePudding user response:

Try changing your src to this:

src = {course?.courseAttachments?.attachmentUrl}   "&loop=false"
  • Related