Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Responsively resize SublimeVideo with jQuery
branch: master

This branch is 11 commits behind jonsuh:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
LICENSE
README.md
demo.html

README.md

SublimeVideo jQuery Responsive Design

Responsively resize SublimeVideo, a cloud-based HTML5 video player that provides with full-screen playback and scrubbing controls, with jQuery.

Quickstart

Clone git repo git clone git://github.com/jonsuh/SublimeVideo-jQuery-Responsive-Resize.git or Download it

Features

Function sublimeResize(); will responsively resize your Sublime video as your browser window is resized. By default, the element id="sublime" (html5 video element with class="sublime") is targeted. The width is then determined by the width of element id="wrapper".

Usage

<script src="http://cdn.sublimevideo.net/js/YOURTOKEN.js"></script>

YOURTOKEN should be replaced with the token provided for your site from your SublimeVideo account.

function sublimeResize(){
  var sublimeWidth=$("#wrapper").width();
  var sublimeAspect=1.7777778;
  sublimevideo.resize("sublime",sublimeWidth,sublimeAspect);
}

For widescreen videos, the value of variable sublimeAspect should be 1.7777778 (16/9) For standard videos, the value of variable sublimeAspect should be 1.3333333 (4/3) You can calculate your own aspect ratio by width/height.

If everything is properly set, your video should beautifully resize responsively.

Contribute

Feel free to contribute. https://github.com/jonsuh/SublimeVideo-jQuery-Responsive-Resize

License

Licensed under the MIT. http://opensource.org/licenses/mit-license.php

Copyright (c) 2012 Jonathan Suh | @jonsuh

http://jonsuh.com

Something went wrong with that request. Please try again.