Skip to content

Commit

Permalink
Bugfix/allow android fullscreen (#10)
Browse files Browse the repository at this point in the history
* change main file package.json

* several improvements

* suggestions and fixes

* other fixes

* types safety

* fixes on handlers

* add keys to allow full screen on android
  • Loading branch information
Marcoo09 authored Oct 8, 2021
1 parent 0eb1e4a commit 9ed119b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the Vimeo player JS API (more information https://developer.vimeo.com/player/js-

```
<Vimeo
videoId={'513199601'}
videoId={'76979871'}
onReady={() => console.log('Video is ready')}
onPlay={() => console.log('Video is playing')}
onPlayProgress={(data) => console.log('Video progress data:', data)}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-vimeo-iframe",
"version": "1.0.2",
"version": "1.0.3",
"description": "React Native Vimeo Iframe is a library to render Vimeo videos in a React Native app. This component allows you to embed a Vimeo video in your app and have full access to the Vimeo player JS API (more information https://developer.vimeo.com/player/js-api).",
"homepage": "https://github.com/MetaLabs-inc/react-native-vimeo-iframe#readme",
"main": "lib/commonjs/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const Vimeo: React.FC<LayoutProps> = ({

return (
<WebView
allowsFullscreenVideo={true}
source={{
html: webplayer(videoId, loop, autoPlayValue, controls, speed),
}}
Expand Down
2 changes: 2 additions & 0 deletions src/template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ iframe.height = '98%';
iframe.frameBorder = '0';
iframe.webkitallowfullscreen = true;
iframe.allowfullscreen = true;
iframe.mozallowfullscreen = true;
iframe.allow="autoplay;fullscreen"
iframe.id = PLAYER_ID;
document.body.appendChild(iframe);
var player = $f(iframe);
Expand Down

0 comments on commit 9ed119b

Please sign in to comment.