Skip to content

Commit

Permalink
Merge pull request #318 from BloomBooks/BL-13824_sl_video_controls
Browse files Browse the repository at this point in the history
BL-13824 show video element controls (#318)
  • Loading branch information
JohnThomson authored Sep 10, 2024
2 parents 4bb86ec + 8962c24 commit df4d2d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ export class Video {
return;
}
this.getVideoElements().forEach(videoElement => {
if (videoElement.hasAttribute("controls")) {
videoElement.removeAttribute("controls");
}
videoElement.setAttribute("controls", "controls");
videoElement.setAttribute("disablepictureinpicture", "true");
videoElement.setAttribute(
"controlsList",
"noplaybackrate nofullscreen nodownload noremoteplayback"
);
if (!videoElement.hasAttribute("playsinline")) {
videoElement.setAttribute("playsinline", "true");
}
Expand Down

0 comments on commit df4d2d2

Please sign in to comment.