0.0.9 • Published 9 years ago

mini-fullscreen v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

npm version Build Status Coverage Status Code Climate Inch CI

Dependency Status devDependency Status

mini-fullscreen

Mini wrapper for browser Fullscreen API

This package is part of WRTC project.

Not yet ready for public use.

If you have different needs regarding the functionality, please add a feature request.

Installation

npm install --save mini-fullscreen

Usage

This package is part of WRTC project.

Not yet ready for public use.

var miniFullScreen = require('mini-fullscreen');


function printStatus(result) {
  console.log('result:', result);
  console.log('miniFullScreen.getEnabled():', miniFullScreen.getEnabled());
  console.log('miniFullScreen.getActive():',  miniFullScreen.getActive());
  console.log('miniFullScreen.getElement():', miniFullScreen.getElement());
}

function init() {
  var htmlElement = document.getElementById('full-element');

  miniFullScreen.on('change', function(event) {
    console.log('miniFullScreen.on(change):', event);
  });

  miniFullScreen.on('error', function(event) {
    console.log('miniFullScreen.on(error):', event);
  });

  document.getElementById('action-start').addEventListener('click', function() {
    var result = miniFullScreen.start(htmlElement);
    printStatus(result);
  });

  document.getElementById('action-stop').addEventListener('click', function() {
    var result = miniFullScreen.stop(htmlElement);
    printStatus(result);
  });

  document.getElementById('action-toggle').addEventListener('click', function() {
    var result = miniFullScreen.toggle(htmlElement);
    printStatus(result);
  });

}

It also sets global variable window.miniFullScreen (if global window object exists) to itself.

Credits

Alexander

Links to package pages:

github.com   npmjs.com   travis-ci.org   coveralls.io   inch-ci.org

License

MIT

0.0.9

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago