From 26fd89ecb08e3ebc20aa28fcda2fe4d44df00a15 Mon Sep 17 00:00:00 2001 From: Kasper Moskwiak Date: Mon, 27 Jul 2015 18:58:59 +0200 Subject: [PATCH] readme, version --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++----------- example.html | 2 -- package.json | 6 +++--- 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0f308f8..4258c85 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Video.js Test +# Video.js Resolution Switcher A revolutionary plugin for video.js @@ -7,27 +7,61 @@ A revolutionary plugin for video.js Once you've added the plugin script to your page, you can use it with any video: ```html + ``` There's also a [working example](example.html) of the plugin you can check out if you're having trouble. -## Documentation -### Plugin Options +## Methods -You may pass in an options object to the plugin upon initialization. This -object may contain any of the following properties: -#### option -Type: `boolean` -Default: true +### newVideoSources([source]) -An example boolean option that has no effect. +```javascript + +// Update video sources +player.newVideoSources([ + { 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", lable: 'HD' }, + { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4", label: '4k' } +]) + +``` +#### PARAMETERS: + * source `Array` array of sources + + +## Events + +### resolutionchange `EVENT` + +> Fired when resolution is changed -## Release History - - 0.1.0: Initial release diff --git a/example.html b/example.html index a9422b5..e3ab95d 100644 --- a/example.html +++ b/example.html @@ -56,8 +56,6 @@ } ]) - window.player = player; - player.on('resolutionchange', function(){ console.info('Source changed to %s', player.src()) }) diff --git a/package.json b/package.json index 0bee389..788e3e4 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "videojs-test", - "version": "0.0.0", + "name": "videojs-resolution-switcher", + "version": "0.1.0", "author": "Kasper Moskwiak", - "description": "A revolutionary plugin for video.js", + "description": "Resolution switcher for video.js 5", "license": "Apache-2.0", "keywords": [ "videojs",