1.1.0 • Published 6 years ago

ic-vue-fullsceen v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

v-fullscreen

A Vue directive for browser into fullscreen mode.

Install

$ npm i ic-vue-fullscreen || yarn add ic-vue-fullscreen

Usage

import Vue from 'vue'
import IcVueFullscreen from 'ic-vue-fullscreen'

Vue.use(IcVueFullscreen, options) // options is an optional object
<div v-fullscreen>
    
</div>

If you want to do some stuff when browser into fullscreen mode or exiting fullscreen mode, you can use it with a handler:

<component v-fullscreen="handler"></component>
{
    methods: {
        handler (fullscreenElement) {
            // fullscreenElement is exists when browser into fullscreen
            // or is null when browser exited fullscreen
        }
    }
}

options.events

Currently, options only supports a events prop. It's an array of events, defaults to 'click'.

More informations about Fullscreen API, see here