-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dee57c8
commit 2a593fc
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters