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

Critical: [Web Safari] (MacOS & iOS) won't render video player #116352

Closed
ollyde opened this issue Dec 1, 2022 · 11 comments
Closed

Critical: [Web Safari] (MacOS & iOS) won't render video player #116352

ollyde opened this issue Dec 1, 2022 · 11 comments
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@ollyde
Copy link

ollyde commented Dec 1, 2022

Flutter 3.3.9
video_player: 2.4.8

Currently we cannot release on Web because of this 1 bug.

When using the video player on Safari using the canvis-kit renderer it doesn't display while inside a Clip (ClipRR, ClipOval, etc).

There is a temporary solution mentioned here #80401

But looking at the DOM in canvis-kit there is no 'clip' or reference to clip path.

Screenshot 2022-12-01 at 15 45 06

The JS solution is also noted here https://jsfiddle.net/yjbanov/nh9jzLba/42/

But how can we do this using canvis-kit?

Using the HTML renderer isn't an option as there are many bugs with it.

We can't ignore clip as that is an essential design in out app.

Screenshot 2022-12-01 at 15 47 49

I doubt it will be in the Flutter master until next Summer.

What is the solution?

@exaby73
Copy link
Member

exaby73 commented Dec 2, 2022

Hello. There seems to be a duplicate issue #80401. This may be already fixed in beta or master channels. Could you confirm this?

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 2, 2022
@ollyde
Copy link
Author

ollyde commented Dec 2, 2022

@exaby73

Testing on beta channel I can confirm that it works! Tis fixed

When should we expect this in release? Since it's critical to many people.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 2, 2022
@ollyde
Copy link
Author

ollyde commented Dec 2, 2022

Test code btw:

import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

void main() {
  runApp(
    MaterialApp(
      home: _App(),
    ),
  );
}

class _App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: _BumbleBeeRemoteVideo(),
    );
  }
}

class _BumbleBeeRemoteVideo extends StatefulWidget {
  @override
  _BumbleBeeRemoteVideoState createState() => _BumbleBeeRemoteVideoState();
}

class _BumbleBeeRemoteVideoState extends State<_BumbleBeeRemoteVideo> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.network(
      'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
      videoPlayerOptions: VideoPlayerOptions(),
    );

    playThis();
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return ClipRRect(
      borderRadius: BorderRadius.circular(24),
      child: Container(
        width: 320,
        height: 200,
        color: Colors.green,
        child: VideoPlayer(_controller),
      ),
    );
  }

  Future<void> playThis() async {
    await _controller.setLooping(true);
    await _controller.setVolume(0.0);
    await _controller.initialize();
    _controller.play();
  }
}

@exaby73
Copy link
Member

exaby73 commented Dec 2, 2022

You can check the cherrypick process for this. Since this is fixed, I will close this issue as a duplicate of #80401. Thank you

@exaby73 exaby73 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
@exaby73 exaby73 added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels Dec 2, 2022
@ollyde
Copy link
Author

ollyde commented Dec 2, 2022

@exaby73 thanks for your help

We can't use an un-test an unstable Flutter branch in a production release of a platform. Do you have some sort of rough estimate for when it could be released?

@exaby73
Copy link
Member

exaby73 commented Dec 2, 2022

I cannot be certain unfortunately. You can request a cherry-pick with the above link. There is a template you can fill, and it may be considered for the next hotfix.

@ollyde
Copy link
Author

ollyde commented Dec 2, 2022

@exaby73 where is the template, perhaps I can nudge them!

@exaby73
Copy link
Member

exaby73 commented Dec 2, 2022

You can find it here

@ollyde
Copy link
Author

ollyde commented Dec 6, 2022

@exaby73 I've made a CP, what next?

@exaby73
Copy link
Member

exaby73 commented Dec 6, 2022

We'll have to wait for the team to look at it :) Thank you for the CP request

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants