All Projects → darcyclarke → Jquery Fullscreen Plugin

darcyclarke / Jquery Fullscreen Plugin

Licence: mit
A full suite fullscreen plugin with fallback support

Programming Languages

javascript
184084 projects - #8 most used programming language

jQuery Fullscreen

Adds:

  • $.support.fullscreen (boolean)
  • fullscreen pseudo selector & filter (.is .find .filter)
$(el).on('fullscreenchange', fn)
$(el).trigger('requestFullScreen', fn) // or $(el).requestFullScreen(fn)
$(el).trigger('cancelFullScreen', fn) // or $(el).cancelFullScreen(fn)

Uses

  • :-webkit-full-screen and :-moz-fullscreen (no fallbacks)
  • webkit/moz fullscreenchange
  • webkit/moz Cancel/Request FullScreen
  • W3C fullscreenchange
  • W3C Exit/Request FullScreen

Fallbacks

  • Utilizes fullscreen popups with load/unload events to mimic Cancel/Request Fullscreen events
  • Trigger fullscreenchange on load/unload events
  • To note: You must turn on fallback support

Examples

$.extend($.fullscreen.settings, { fallback: true, window_url: 'http://google.com' })
$('video').on('click', function(e) {
  e.preventDefault()
  this.pause()
  $(this).requestFullScreen(function() {
    this.play()
  })
})
$('.close').on('click', function(e) {
  e.preventDefault()
  var video = $('video:fullscreen')
    video[0].pause()
    video.cancelFullScreen(function() {
      this.play()
  })
})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].