From 6b70c4b49abbfbfb23aaa6681e261be24a4de3f2 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Thu, 4 Feb 2016 14:59:59 +1100 Subject: [PATCH] Update readme.md --- readme.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 2ed1aba2..d756d09d 100644 --- a/readme.md +++ b/readme.md @@ -468,7 +468,18 @@ Here's a list of the methods supported: Get/Set the media source.

array
- .source([{ src: "/path/to/video.webm", type: "video/webm", ...more attributes... }, { src: "/path/to/video.mp4", type: "video/mp4", ...more attributes... }])`
+
.source([
+      	{ 
+      		src: "/path/to/video.webm", 
+      		type: "video/webm", 
+      		...more attributes... 
+      	}, 
+      	{ 
+      		src: "/path/to/video.mp4", 
+      		type: "video/mp4", 
+      		...more attributes... 
+      	}
+      ])`

This will inject a child `source` element for every element in the array with the specified attributes. `src` is the only required attribute although adding `type` is recommended as it helps the browser decide which file to download and play.

YouTube