From 563252be94cafd5d973271f56c91fda4b1f87e4f Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Sat, 19 Nov 2016 08:37:02 +0000 Subject: [PATCH] Add fullscreen example to demo --- package.json | 1 + src/demo/App.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/package.json b/package.json index a7a0bce9..c7829581 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "react-dom": "^15.3.2", "rimraf": "^2.5.4", "sass-loader": "^4.0.2", + "screenfull": "^3.0.2", "snazzy": "^5.0.0", "standard": "^8.3.0", "style-loader": "^0.13.1", diff --git a/src/demo/App.js b/src/demo/App.js index d2cc6349..27620801 100644 --- a/src/demo/App.js +++ b/src/demo/App.js @@ -1,4 +1,6 @@ import React, { Component } from 'react' +import { findDOMNode } from 'react-dom' +import screenfull from 'screenfull' import 'normalize.css/normalize.css' import './defaults.scss' @@ -50,6 +52,9 @@ export default class App extends Component { this.setState(state) } } + onClickFullscreen = () => { + screenfull.request(findDOMNode(this.player)) + } onConfigSubmit = () => { let config try { @@ -111,6 +116,7 @@ export default class App extends Component { +