Browse Source

Add HTML5 Video Example to the static example

Loïc Hoguin 12 years ago
parent
commit
ca98a86b30

+ 5 - 0
examples/static/README.md

@@ -42,3 +42,8 @@ $ curl -sLO http://localhost:8080/test.txt
 $ cat test.txt
 If you read this then the static file server works!
 ```
+
+HTML5 Video Example
+-------------------
+
+Open http://localhost:8080/video.html in your favorite browser.

BIN
examples/static/priv/small.mp4


BIN
examples/static/priv/small.ogv


+ 11 - 0
examples/static/priv/video.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+	<h1>HTML5 Video Example</h1>
+	<video controls>
+		<source src="small.ogv" type="video/ogg"/> 
+		<source src="small.mp4" type="video/mp4"/>
+	</video>
+	<p>Videos taken from <a href="http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5/">TechSlides</a></p>
+</body>
+</html>

+ 2 - 1
examples/static/start.sh

@@ -1,3 +1,4 @@
 #!/bin/sh
 erl -pa ebin deps/*/ebin -s static \
-	-eval "io:format(\"Point your browser at http://localhost:8080/test.txt~n\")."
+	-eval "io:format(\"Point your browser at http://localhost:8080/test.txt~n\")." \
+	-eval "io:format(\"Point your browser at http://localhost:8080/video.html~n\")."