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

Video is recording horizontal instead of vertical on mobile. #660

Open
Tschucki opened this issue Oct 21, 2022 · 0 comments
Open

Video is recording horizontal instead of vertical on mobile. #660

Tschucki opened this issue Oct 21, 2022 · 0 comments
Labels

Comments

@Tschucki
Copy link

Tschucki commented Oct 21, 2022

Description

I set the plugins.video.aspectRatio to 9/16, so it records a vertical video. This works well on desktop but not on mobile devices. There it records a horizontal video in portrait orientation.
What is strange, is that when rotating the phone to landscape it records a correct 9:16 video

Steps to reproduce

Set videoOptions:

videoOptions: {
                video: {
                    aspectRatio: {ideal: 9 / 16, min: 9 / 16, max: 1},
                    facingMode: 'user',
                },
                videoMimeType: 'video/webm;codecs=vp8',
                plugins: {
                    record: {
                        audio: true,
                        video: {
                            aspectRatio: {ideal: 9 / 16, min: 9 / 16, max: 1},
                            facingMode: "user"
                        },
                        maxLength: this.videoMaxLength,
                        videoMimeType: 'video/webm;codecs=vp8'
                    }
                }
            }

Results

Expected

Record a vertical 9:16 video in portrait orientation

Actual

It records a landscape video instead.

Error output

If there are any errors at all, please include them here.

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

what version of videojs does this occur with?
Video.js: 7.20.3
Video.js-Record: 4.5.0

browsers

what browser(s) are affected? Make sure to test with all third-party browser extensions disabled.
Safari iOS

OSes

what platforms (operating systems and devices) are affected?

@Tschucki Tschucki changed the title Video is recording horizontal instead of vertical on moble. Video is recording horizontal instead of vertical on mobile. Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants