Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Provides a workaround for Android users who can't view embedded videos from Vimeo.
JavaScript
branch: master
Failed to load latest commit information.
img Examples Included
js Examples Included
.DS_Store Examples Included
README.md Update README.md
example.html Examples Included

README.md

Introducing VimeoFixr.js

A super-lighweight, dead-simple jQuery plugin to detect Android browsers that won't play embedded Vimeo players.

Reference: Android Vimeo Bug

Setup

Include the following libraries in your layout

  • jQuery 1.7+ or Zepto
  • FitVids.js (Optional)
  • VimeoFixr.js

Note: FitVids.js is only optional if you set useFitvids option to false.

<script src="path/to/jquery.min.js"></script>
<script src="path/to/jquery.fitvids.js"></script>
<script src="path/to/jquery.vimeofixr.js"></script>

Usage

Include links to your mobile vimeo videos and assign a class (example: fixThis), then target the links with vimeoFixr().

Optional: Link a placeholder image to give the user the feeling of clicking on an inline video player

<a href="http://www.vimeo.com/m/70387032" class="fixThis"><img src="path/to/placeholder.jpg"/></a>

<script>
  $(document).ready(function(){

    // Target your links using whatever class you assigned them
    $(".fixThis").vimeoFixr();
  });
</script>

If your user is visiting your site on a device not effected by the Vimeo bug, VimeoFixr.js will replace each link with a vimeo inline iframe player, then wrap that player in a FitVids.js container.

Options

  • wrapper: The class of the div your inline player will be wrapped with
  • useFitvids: if set to 'false', FitVids.js is not required
  • detectAndroid: will replace all links regardless of if on Android device or not
<script>
  $(document).ready(function(){

    $(".fixThis").vimeoFixr(
            {
            wrapper: 'video-container',
            useFitvids: true,
            detectAndroid: true
            }
        );

  });
</script>

Note: It may seem odd to have detectAndroid as an option, but this plugin can also be used for progressive enhancement / RWD

Something went wrong with that request. Please try again.