Camera stream view fixes

This commit is contained in:
Yegor Vialov 2020-02-20 22:42:19 +00:00
parent 06f994a827
commit fba4459977
2 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,12 @@ function fixCameraImgView() {
img[0].removeAttribute('style'); img[0].removeAttribute('style');
setTimeout(function() { setTimeout(function() {
window[messageChannel].postMessage(document.body.clientWidth / img[0].offsetHeight); window[messageChannel].postMessage(document.body.clientWidth / img[0].offsetHeight);
}, 100); }, 200);
setTimeout(function() {
document.body.style.pointerEvents = 'none';
document.body.style.overflow = 'hidden';
window.onscroll = function () { window.scrollTo(0, 0); };
}, 200);
} }
} }

View File

@ -105,6 +105,7 @@ class _CameraStreamViewState extends State<CameraStreamView> {
initialUrl: streamUrl, initialUrl: streamUrl,
initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow, initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow,
debuggingEnabled: Logger.isInDebugMode, debuggingEnabled: Logger.isInDebugMode,
gestureNavigationEnabled: false,
javascriptMode: JavascriptMode.unrestricted, javascriptMode: JavascriptMode.unrestricted,
javascriptChannels: { javascriptChannels: {
JavascriptChannel( JavascriptChannel(