youtube_player_flutter icon indicating copy to clipboard operation
youtube_player_flutter copied to clipboard

[BUG] Player not working in full screen on web

Open amitm29 opened this issue 3 years ago • 8 comments

Describe the bug When player's full screen button is clicked on web, it tries to open up the full screen but then goes back to the normal view and resets the video to its initial position.

To Reproduce Steps to reproduce the behavior: Run the youtube_player_iframe example on web and click on the full screen button in the player. (NOTE: the hosted example is working fine, but when a new version is built it is having this issue. So, I believe some new changes have introduced this issue.)

Technical Details:

  • OS: Windows 10
  • Browser: Chrome
  • Library Version used: 2.1.0

amitm29 avatar Jun 23 '21 06:06 amitm29

I am also facing this issue, Any Solutions or workaround as of now ?

jaikrishnachandrasekar avatar Jun 25 '21 07:06 jaikrishnachandrasekar

I am also facing the same issue. Will it be fixed anytime soon? Is there a workaround?

divXp avatar Jun 27 '21 16:06 divXp

I think it was fixed in the latest flutter upgrade today, but when we resize the browser window, it is getting weird ui, the console window is showing the error below :

Height of Platform View type: [youtube-player-1063275035] may not be set. Defaulting to height: 100%. Set style.height to any appropriate value to stop this message. Width of Platform View type: [youtube-player-1063275035] may not be set. Defaulting to width: 100%. Set style.width to any appropriate value to stop this message.

jaikrishnachandrasekar avatar Jun 28 '21 11:06 jaikrishnachandrasekar

I think it was fixed in the latest flutter upgrade today, but when we resize the browser window, it is getting weird ui, the console window is showing the error below :

Height of Platform View type: [youtube-player-1063275035] may not be set. Defaulting to height: 100%. Set style.height to any appropriate value to stop this message. Width of Platform View type: [youtube-player-1063275035] may not be set. Defaulting to width: 100%. Set style.width to any appropriate value to stop this message.

It is not working form me still. The Flutter version is 2.2.2.

divXp avatar Jun 28 '21 16:06 divXp

Widget build(BuildContext context) { double width = MediaQuery.of(context).size.width;

return Container(
  alignment: Alignment.center,
  width: width,
  child: Row(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Expanded(
        child: YoutubePlayerIFrame(
          controller: _controller,
          aspectRatio: 16 / 9,
        ),
      ),
    ],
  ),
);

}

_controller = YoutubePlayerController( initialVideoId: videoId, params: YoutubePlayerParams( autoPlay: false, strictRelatedVideos: true, startAt: startDuration, showFullscreenButton: true, desktopMode: true, privacyEnhanced: true, //useHybridComposition: true, ), );

This is the code. Fullscreen button doesn't work

divXp avatar Jun 28 '21 16:06 divXp

Flutter 2.3.0-24.1.pre • channel beta , This version is what i am using right now and the issue seems to be fixed regarding the fullscreen.

jaikrishnachandrasekar avatar Jun 28 '21 16:06 jaikrishnachandrasekar

Flutter 2.3.0-24.1.pre • channel beta , This version is what i am using right now and the issue seems to be fixed regarding the fullscreen.

Thank you!!! this solution works!!!

Chandan-CV avatar Jul 29 '21 05:07 Chandan-CV

Flutter 2.3.0-24.1.pre • channel beta , This version is what i am using right now and the issue seems to be fixed regarding the fullscreen.

It works perfectly. That's not an issue with this package but with Flutter

enzomanuelmangano avatar Apr 26 '22 13:04 enzomanuelmangano