Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add playInline as a React Player prop for playing videos on mobile #1331

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/gallery/src/components/item/videos/videoItem.js
Original file line number Diff line number Diff line change
@@ -76,8 +76,8 @@ class VideoItem extends React.Component {
isHLSVideo() {
return (
this.props.videoUrl &&
(this.props.videoUrl.includes('/hls') ||
this.props.videoUrl.includes('.m3u8'))
(this.props.videoUrl.toLowerCase().includes('/hls') ||
this.props.videoUrl.toLowerCase().includes('.m3u8'))
);
}

@@ -173,12 +173,13 @@ class VideoItem extends React.Component {
);

const attributes = {
playInline: true,
controlsList: 'nodownload',
disablePictureInPicture: true,
muted: !this.props.options.videoSound,
preload: 'metadata',
style: getStyle(isCrop, isWiderThenContainer),
type: 'video/mp4',
type: utils.isiOS() ? 'application/x-mpegURL' : 'video/mp4', // Specify correct MIME type for iOS
};

if (shouldCreateVideoPlaceholder(this.props.options)) {

Unchanged files with check annotations Beta

Check warning on line 10 in packages/gallery/src/components/gallery/index.tsx

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type

Check warning on line 11 in packages/gallery/src/components/gallery/index.tsx

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type

Check warning on line 4 in packages/gallery/src/components/helpers/emitter.ts

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type

Check warning on line 10 in packages/gallery/src/components/helpers/emitter.ts

GitHub Actions / lint (16.20.0)

Missing return type on function

Check warning on line 12 in packages/gallery/src/components/helpers/emitter.ts

GitHub Actions / lint (16.20.0)

Forbidden non-null assertion

Check warning on line 34 in packages/gallery/src/components/helpers/emitter.ts

GitHub Actions / lint (16.20.0)

Missing return type on function

Check warning on line 44 in packages/gallery/src/components/helpers/emitter.ts

GitHub Actions / lint (16.20.0)

Missing return type on function

Check warning on line 1 in packages/gallery/src/components/helpers/proxy.ts

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type

Check warning on line 34 in packages/gallery/src/components/helpers/thumbnailsLogic.ts

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type

Check warning on line 34 in packages/gallery/src/components/helpers/thumbnailsLogic.ts

GitHub Actions / lint (16.20.0)

Unexpected any. Specify a different type