max was converted to zero based twice. Removed -1 in the switch up call that prevented the stream from switching to the highest index.
Merge pull request #270 from MSOpenTech/development

Contains fixes for segment generation
Merge branch 'development' of https://github.com/Dash-Industry-Forum/dash.js into development
Integrated support for grunt jsdocs and added stubbed docs and examples to media player and debug class for a start.
Merge pull request #272 from AkamaiDASH/jsdocs

Added JSDoc3 via grunt to project for full documentation support.
change JSDocs dir name to lowercase to match project and added info into README.md for nom install for grunt-jsdoc-pluing
Merge pull request #273 from AkamaiDASH/development

change JSDocs dir name to lowercase to match project and added info into...
clean up of jsdocs
Merge pull request #274 from AkamaiDASH/development

clean up of jsdocs
fix unparseable package.json
Adding more docs to api and modifying namespace for debug to full path.
Merge pull request #275 from bbcrddave/fix_broken_packagedotjson

Fix unparseable package.json
Merge pull request #276 from AkamaiDASH/development

Adding more docs to api and modifying namespace for debug to full path.
adds bearer token support for PlayReady protection system
fixes segment index calculation caused by javascript floaing point problem