Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Last active October 8, 2021 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanusdad/be659ff6f97d34e5fa31ef2242a3f06a to your computer and use it in GitHub Desktop.
Save nanusdad/be659ff6f97d34e5fa31ef2242a3f06a to your computer and use it in GitHub Desktop.
Embedding videos
  • Use <video> HTML element - w3schools
  • Disabling picture-in-picture
<video controls disablePictureInPicture controlsList="nodownload">
  <source src="https://www.w3schools.com/html/mov_bbb.ogg" type="video/mp4">
  <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/ogg">
</video>
  • Disabling picture-in-picture with JavaScript
<video id="vid" controls muted>
<source src="https://www.w3schools.com/html/mov_bbb.mp4">
</video>
<script>
vid=document.getElementById("vid")
vid.disablePictureInPicture = true
</script>
  • AWS S3 Policy to allow access from restricted domain Doc Link
{
  "Version":"2012-10-17",
  "Id":"http referer policy example",
  "Statement":[
    {
      "Sid":"Allow get requests originating from www.example.com and example.com.",
      "Effect":"Allow",
      "Principal":"*",
      "Action":["s3:GetObject","s3:GetObjectVersion"],
      "Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET/*",
      "Condition":{
        "StringLike":{"aws:Referer":["http://www.example.com/*","http://example.com/*"]}
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment