Created
November 8, 2019 13:53
-
-
Save fatihtoprak/22eeae2e78afa4ff58ed17eda8f2ee57 to your computer and use it in GitHub Desktop.
amp fullscreen video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html ⚡> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>AMP #0</title> | |
| <link rel="canonical" href="amps.html" > | |
| <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
| <meta name="apple-mobile-web-app-title" content="AppTitle"> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <script async custom-element="amp-video" src="https://cdn.ampproject.org/v0/amp-video-0.1.js"></script> | |
| <link href='https://fonts.googleapis.com/css?family=Questrial' rel='stylesheet' type='text/css'> | |
| <style amp-custom> | |
| body { | |
| max-width: 527px; | |
| font-family: 'Questrial', Arial; | |
| } | |
| [fallback] { | |
| display: block; | |
| /* @alternative */ display: flex; | |
| flex-direction: column; | |
| flex-wrap: nowrap; | |
| justify-content: center; | |
| align-items: center; | |
| background: rgba(0, 0, 0, 0.5); | |
| color: #fff; | |
| } | |
| .spacer { | |
| height: 100vh; | |
| } | |
| </style> | |
| <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | |
| <script async src="https://cdn.ampproject.org/v0.js"></script> | |
| </head> | |
| <body> | |
| <h1>amp-video</h1> | |
| <amp-video | |
| id="myVideo" | |
| src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4" | |
| width="720" | |
| height="405" | |
| layout="responsive" | |
| rotate-to-fullscreen | |
| controls> | |
| <div placeholder> | |
| This is a placeholder | |
| </div> | |
| <div fallback> | |
| This is a fallback | |
| </div> | |
| </amp-video> | |
| <h3>Actions</h3> | |
| <button on="tap:myVideo.play">Play</button> | |
| <button on="tap:myVideo.pause">Pause</button> | |
| <button on="tap:myVideo.mute">Mute</button> | |
| <button on="tap:myVideo.unmute">Unmute</button> | |
| <h2>Autoplay</h2> | |
| <amp-video | |
| autoplay | |
| auto-fullscreen | |
| src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4" | |
| width="720" | |
| height="405" | |
| layout="responsive" | |
| controls> | |
| </amp-video> | |
| <div class="spacer"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment