From 99559207f1a4d65b851f74cff2123f2a56a355f5 Mon Sep 17 00:00:00 2001 From: Kasper Moskwiak Date: Tue, 28 Jul 2015 14:35:31 +0200 Subject: [PATCH] readme --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a6937ca..c1a4981 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ Resolution switcher for [video.js](https://github.com/videojs/video.js) build fo ## Getting Started -Once you've added the plugin script to your page, you can use it with any video: +Setup sources dynamically: ```html - + ``` +Or use `` tags: + +```html + + + + +``` + There's also a [working example](example.html) of the plugin you can check out if you're having trouble. ## Methods -### newVideoSources([source]) +### updateSrc([source]) ```javascript // Update video sources -player.newVideoSources([ +player.updateSrc([ { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4", label: 'SD' }, { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4", label: 'HD' }, { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4", label: '4k' }