Index: tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html |
diff --git a/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html b/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4b32ddecf3659e3954abcd03171cfb508da457fa |
--- /dev/null |
+++ b/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html |
@@ -0,0 +1,37 @@ |
+<!doctype html> |
+<html> |
+<head> |
+ <style type="text/css"> |
+ /* Make the video stretch to fill the screen. */ |
+ :-webkit-full-screen #fullscreenvideo { |
+ width: 100%; |
+ height: 100%; |
+ } |
+ </style> |
+</head> |
+<body> |
+ <!--This video was obtained from |
+ https://videos.pexels.com/videos/adventure-trip-481. It is licensed under |
+ Creative Commons Zero, which does not require attribution.--> |
+ <video controls src="road_trip_640_480.mp4" width="640" |
+ height="480" id="fullscreenvideo" autoplay="autoplay"> |
+</body> |
+<script> |
+ var videoElement = document.getElementById("fullscreenvideo"); |
+ |
+ function toggleFullScreen() { |
+ if (!document.webkitFullScreen) { |
+ videoElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); |
+ } else { |
+ document.webkitCancelFullScreen(); |
+ } |
+ } |
+ |
+ // Pressing "Return" causes the video to enter fullscreen. |
+ document.addEventListener("keydown", function(e) { |
+ if (e.keyCode == 13) { |
+ toggleFullScreen(); |
+ } |
+ }, false); |
+</script> |
+</html> |