WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

iOS full screen is showing a black stream when going from portrait to landscape or viceversa

Open g1za opened this issue 2 years ago • 9 comments

Hello,

With latest version I can go full screen using the companion app (latest version) and Safari (iOS 17.1). But when I rotate my mobile in landscape mode the stream goes black. It will come back when back to portrait mode.

In HA log I see this which is logged right after I go full screen using the overlaying button: Uncaught error from WebKit 605.1.15 on iOS 17.1 TypeError: undefined is not an object (evaluating 'this.requestFullscreen().catch') /webrtc/webrtc-camera.js:533:41

Regards

g1za avatar Oct 29 '23 23:10 g1za

Try latest master version

AlexxIT avatar Oct 30 '23 08:10 AlexxIT

I'm already on 3.5.0.

Edit: ah I see there was a new commit to master following 3.5.0. Ok I will try it. Thanks

g1za avatar Oct 30 '23 09:10 g1za

I replaced webrtc-camera.js with the latest version, restarted, but I see the same behavior as before:

`Logger: frontend.js.latest.202310050 Source: components/system_log/init.py:300 First occurred: 10:16:55 (1 occurrences) Last logged: 10:16:55

Uncaught error from WebKit 605.1.15 on iOS 17.1 TypeError: undefined is not an object (evaluating 'this.requestFullscreen().catch') /webrtc/webrtc-camera.js:533:41`

g1za avatar Oct 30 '23 09:10 g1za

I think you have problems with cache in your browser. 533 line is different in latest master version

AlexxIT avatar Oct 30 '23 10:10 AlexxIT

This time I first deleted the webrtc-camera.js file in custom_components -> webrtc -> www and then I replaced it with the new version. If I now open the new one I see line 533 is this.requestFullscreen().catch(console.warn);

I restarted, cleared the cache of the companion app and forced a full cache reload in the browser (Firefox).

As soon as I load the stream full screen in the companion app, in the log I still get:

Uncaught error from WebKit 605.1.15 on iOS 17.1 TypeError: undefined is not an object (evaluating 'this.requestFullscreen().catch') /webrtc/webrtc-camera.js:533:41

g1za avatar Oct 30 '23 10:10 g1za

wait it seems when I downloaded the new file the new commit was not included. :| I copied the code and pasted in the file. I now have all 642 lines of code and I also see line 533 is different. Let me test again

g1za avatar Oct 30 '23 10:10 g1za

ok I had to delete the .gz archives in the www folder. Now when I go full screen and then landscape I do not see any error in the log. But the stream in landscape is still black :(

g1za avatar Oct 30 '23 11:10 g1za

I was checking if anything changed with the new release (v3.5.1) and I discovered something interesting. It seems the problem is linked to the action of rotating the device. If I put the mobile in landscape and I go full screen the stream is shown; at that point it becomes black if I rotate it to portrait. Still no errors in the log. Hope this is useful somehow. Cheers

g1za avatar Jan 05 '24 15:01 g1za

Having the same issue

Martinvdm avatar Jun 30 '24 11:06 Martinvdm