With the new features of HTML5 being constantly shoved in our faces, I though I’d share a little snippet of code that adjusts the initial volume of a video on a HTML page- this particular example is used at http://www.redsumo.com/blog for the video header on the main page. The video was too loud when the client computer volume was at 100% so, we decided it needed lowering, without re-encoding the video.
<video id=“welcomevid” width=“620” height=“250” controls=“controls” autoplay=“autoplay” onplay=“document.getElementById(‘welcomevid’).volume=0.2;” ></video>
Note the id=“welcomevid” which is required in order to set the volume paramter in the DOM with the getElementById command.
Volume control is 0-1 with 0.5 being 50% etc. hence the use of 0.2 in this example.
It’s been yet another busy couple of months, separated by my 10 days in sunny Georgia, USA! 2 Key new websites have been launched. Both complete rebuilds of corporate sites, Firstly the new BMS site has very little to do with myself, other than some testing and the post-it-pin-it integration on the contact page, that said it’s a fantastic design and takes us nicely into the modern web era with clean lines and sharper images. Secondly, the new Redsumo.com website practices what we preach by being a shopping cart solution itself, which is your one-stop shop to getting your new e-commerce site off the ground. I had a number of involvements on this site, more notably on the back-end configuration, than the front end design, but I’ve been working on some of the mobile theme stuff and getting my hands dirty with lots of PHP!
To see the sites click below:
BMS – http://www.beoleymill.co.uk
Redsumo.com – http://www.redsumo.com
Redsumo News – http://www.redsumo.com/blog