Skip to content

Commit

Permalink
init readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettCleary committed Aug 28, 2024
1 parent dee57c8 commit 2a593fc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# HyperPlay Browser SDK

SDK for browser games integrating with HyperPlay's Browser Platform.
SDK for browser projects integrating with HyperPlay's Browser Platform.

## Installation

```bash
npm install @hyperplay/browser-sdk
```

# Integration

The following code snippet can be tested with the [browser-sdk-demo project](https://github.com/HyperPlay-Gaming/browser-sdk-demo).

```tsx
import { requestFullscreen } from '@hyperplay/browser-sdk'

...

<button onClick={() => {requestFullscreen({ elementId: 'gameCanvas', setStyle: true })}}>Request Fullscreen</button>
...
<div id="gameCanvas">Some Content</div>
```

Note that `requestFullscreen` will call `Element.requestFullscreen` by default if your project is not being rendered in the HyperPlay Store.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperplay/browser-sdk",
"version": "0.0.3",
"version": "0.0.4",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2a593fc

Please sign in to comment.