Fix camera stream open
This commit is contained in:
@ -20,11 +20,21 @@ class _CameraStreamViewState extends State<CameraStreamView> {
|
|||||||
String streamUrl = "";
|
String streamUrl = "";
|
||||||
|
|
||||||
launchStream() {
|
launchStream() {
|
||||||
HAUtils.launchURLInCustomTab(
|
Navigator.push(
|
||||||
context: context,
|
context,
|
||||||
url: streamUrl,
|
MaterialPageRoute(
|
||||||
enableDefaultShare: false,
|
builder: (context) => WebviewScaffold(
|
||||||
showPageTitle: false
|
url: "$streamUrl",
|
||||||
|
withZoom: true,
|
||||||
|
appBar: new AppBar(
|
||||||
|
leading: IconButton(
|
||||||
|
icon: Icon(Icons.close),
|
||||||
|
onPressed: () => Navigator.pop(context)
|
||||||
|
),
|
||||||
|
title: new Text("${_entity.displayName}"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +55,8 @@ class _CameraStreamViewState extends State<CameraStreamView> {
|
|||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:monitor-screenshot"), color: Colors.amber),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:monitor-screenshot"), color: Colors.amber),
|
||||||
iconSize: 50.0
|
iconSize: 50.0,
|
||||||
|
onPressed: () => launchStream(),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user