Skip to content

[video_player] Video not visible on [Mac | iOS] Safari when inside a ClipRRect in CanvasKit mode. #80401

Description

@YonyElm

The Problem

I want to be able to play videos on MacOS using Safari together with my Flutter application.
I had this feature working for a while until it stopped
I have noticed that by choosing different versions of flutter (without changing libraries) I get the video back.
Currently, Flutter 2.x doesn't let me enable this feature - and it prevents me from moving to flutter 2.x

Note: The application and video work as expected on mobile-web (chrome and safari) and on Desktop-web (chrome) and on mobile-IOS and mobile-Android

Steps to Reproduce

  1. Create a flutter web application that plays a video when the website loads.
    1. I used video_player plugin
    2. In my case the source of the video is a link to .mp4 file (I checked that if I copy the link and play it in the safari browser I get a working video)
    3. In my case the default video controllers are hidden, and I'm using a videoNotifier to control the video
  2. Deploy the application to Firebase Hosting
  3. Acess the web application using MacOS + Safari (I don't have a similar issue on Chrome/Mobile)
  4. Play the video, and the bug should show up - you will hear sound, but the video won't be rendered

Flutter versions in which the bug doesn't happen: 1.25.0-8.2.pre / 1.25.0-8.3.pre
Flutter versions in which the bug happen: 1.26.0-17.2.pre / 1.26.0-17.8.pre / 1.27.0-8.0.pre / 2.0.3 / 2.0.4 / 2.1.0-12.2.pre

So I guess the key difference happened in the move from 1.25.0-8.3.pre to 1.26.0-17.2.pre

Analyzing app...                                                   
No issues found! (ran in 20.4s)

[✓] Flutter (Channel stable, 2.0.4, on macOS 11.2.3 20D91 darwin-arm, locale en-US)
    • Flutter version 2.0.4 at /Users/---/programs/flutter
    • Framework revision b1395592de (12 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/---/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.128

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listbrowser: safari-macosonly manifests in Safari on macOSe: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webfound in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions