VNAPNIC / presentation-displays

The flutter plugin supports running on two screens. It's basically a tablet connected to another screen via an HDMI or Wireless
https://pub.dev/packages/presentation_displays
BSD 2-Clause "Simplified" License
65 stars 66 forks source link

Sending Webview to Second Screen #15

Open makgabri opened 2 years ago

makgabri commented 2 years ago

Describe the bug I have copied the example code and attempted to replace the second screen with a webview. I can transmit data and text can be shown properly as I used a scaffold and set the title to whatever data I sent from the primary screen to the second screen. However, I am getting an error when trying to display a webview. Not sure if this is an installation issue but I am able to load the webview on the primary page.

To Reproduce Steps to reproduce the behavior:

  1. Go to copy example code.
  2. Replace the build in second screen with: Widget build(BuildContext context) { return SecondaryDisplay( callback: (argument) { setState(() { value = argument; }); }, child: Scaffold( appBar: AppBar( title: Text("Second Screen: "+value), ), body: Center( child: WebView(initialUrl: 'https://www.google.ca',), ) // body: Center( // child: Text(value) // ) ) ); }

Expected behavior The second screen is able to display a webview.

Screenshots Getting the following errors: E/flutter (23367): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method create on channel flutter/platform_views) E/flutter (23367): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7) E/flutter (23367): <asynchronous suspension> E/flutter (23367): #1 AndroidViewController.create (package:flutter/src/services/platform_views.dart:748:5) E/flutter (23367): <asynchronous suspension>

Desktop (please complete the following information):

Smartphone (please complete the following information):

winweib commented 2 years ago

I have the same problem when using camera plugin in second screen. It seem that plugin can't use in second screen. Can someone solve this problem?

vukhacbiet commented 2 years ago

Did you solved this issue?

ot-repo commented 2 years ago

Hello, I am getting the same error, when I try to play a video on the second screen. Any advice on that?

figloalds commented 2 years ago

Hey question, did you get this to work at all?

trapeye commented 1 year ago

the video does not play at the start on the second screen, any advice?

samerquta commented 1 year ago

any update?

alhafoudh commented 8 months ago

@VNAPNIC Is it possible to get this working? Can you at least point us to right direction?

yx-design commented 3 months ago

The camera cannot be previewed on the secondary screen. how to do ?