Skip to content

Commit

Permalink
Merge pull request #32 from apivideo/fix-ios-mp4-download
Browse files Browse the repository at this point in the history
Fix iOS mp4 download
  • Loading branch information
olivier-lando authored Oct 21, 2024
2 parents b93f5fb + 99320d8 commit b377efd
Show file tree
Hide file tree
Showing 5 changed files with 18,229 additions and 10,266 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

All changes to this project will be documented in this file.

## [1.1.1] - 2024-07-17
## [1.1.2] - 2024-10-21
- Fix mp4 download on IOS

## [1.1.1] - 2024-07-17
- Add `isFullScreen` in `onFullScreenChange` event
- Fix `chromeless`

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api.video/react-native-player",
"author": "api.video <[email protected]>",
"version": "1.1.1",
"version": "1.1.2",
"description": "React Native api.video player",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {
useRef,
type Ref,
} from 'react';
import { View, type StyleProp, type ViewStyle } from 'react-native';
import { Linking, View, type StyleProp, type ViewStyle } from 'react-native';
import { WebView } from 'react-native-webview';

const PLAYER_HOST = 'https://embed.api.video';
Expand Down Expand Up @@ -298,6 +298,7 @@ const ApiVideoPlayer = forwardRef(
onMessage={(msg) => onMessage(JSON.parse(msg.nativeEvent.data))}
allowsInlineMediaPlayback={true}
allowsFullscreenVideo={true}
onFileDownload={({ nativeEvent }) => Linking.openURL(nativeEvent.downloadUrl)}
mediaPlaybackRequiresUserAction={false}
injectedJavaScriptBeforeContentLoaded={`window.addEventListener('message', (m) => window.ReactNativeWebView.postMessage(JSON.stringify(m.data)))`}
/>
Expand Down
Loading

0 comments on commit b377efd

Please sign in to comment.