NO BUG: 360 VIDEOS not moving when moving phone using video element

OS: any mobile OS
URL:
Page with no bricks builder, working: No Bricks Builder – bricks.mcbb.in
Page with bricks builder and video element, not working: With Bricks Builder. Video Element – bricks.mcbb.in

When adding a vimeo 360 video in a video element, the video doesn’t move when we move the phone around. Only if we touch and drag around.
However, the intended beahviour is to also move when the phone moves, as it can be seen in the first link.

If i’m doing something wrong let me know.

I added this, that seems to make it work:

<?php 
add_filter('bricks/element/render_attributes', function($attributes, $key, $element) {
    // Check if the current element is a video element
    if ($element->name === 'video') {
        // Check if the current key corresponds to the iframe
        if ($key === 'iframe') {
            // Add the allow attribute only to the iframe
            $attributes[$key]['allow'] = 'autoplay; fullscreen; picture-in-picture; gyroscope;';
        }
    }

    return $attributes;
}, 10, 3);

Hi Marcio,
Thanks so much for your report!

As already replied by email:

As far as I can see, the mobile browser support for 360 vimeo videos pretty limited as of right now: Watch 360 videos – Vimeo Help Center

You are welcome to submit an idea on the idea board, but I think the chances are relatively slim (as of today) if iOS does not support the feature, but only Android (partly).
Idea board – Bricks

Alternatively, have you tried using the Vimeo embed code in a code element? That would be the only possibility I can see.

If the filter works for you/your device: great! However, this feature is probably only supported by a few devices:

Please note: All mobile devices will require a built-in gyroscope sensor for 360 video playback. If a 360 video is played from a device without this sensor, the video will not be rendered for 360 and will play as flat. If you are having trouble viewing in 360 from your mobile device, please consult your device documentation to make sure the gyroscope sensor is included.

360 video playback is not currently supported in any mobile browsers for iOS.

So overall… I wouldn’t consider this as a bug - maybe an improvement for a future version.

Best regards,
timmse

1 Like

Thank you @timmse!
I only thought it was because it was working on pages without bricks. Thanks for letting me know