Android Question Android CCTV image orientation

Beja

Expert
Licensed User
Longtime User
Hi,
1- I could see the example working perfectly and the streaming video from my android phone is showing in the computer perfectly.
The only thing is that the image on the computer is 90 degrees anti-clockwise (or to the left) I had to rotate the phone to show the picture correctly on the computer.
is this in the code or has to do with my phone camera or Android?

2- I am on the same network now (home WiFi).. is it possible to connect them from two networks?

Thanks in advance.
 

Beja

Expert
Licensed User
Longtime User
Thanks Erel,
The phone must be in ladscape position for the video to appear in landscape.. when the phone is held in portrait position then the sever
stays in landscape and that's why the video goes 90 degrees to the left.
 

Attachments

  • B4A-Server.png
    B4A-Server.png
    3.9 KB · Views: 169
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Why don't you just set your apps Orientation to start as follows?
B4X:
#SupportedOrientations: landscape
That way your phone is always correctly Orientated, plus photo's and video should always be taken in landscape for printing or viewing on wide screen IMO.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Why don't you just set your apps Orientation to start as follows?
Hi Peter,
Yes you are right.. I just wanted to show that the Android client (must) be in landscape for now.. but also it would be nice if the server followed the client in orientation change
because if you want to put the phone somewhere in fixed position, then user will be able to mount it in the orientation they want according to available space or need.
I can't edit the server because I don't have C# compiler, but this could be done if a header is sent in the beginning of the communication that will configure the server for landscape or portrait, size of server window... etc.
But I understand this is a demo and tutorial and developers can customize it as they wish.
 
Last edited:
Upvote 0

xpectmore

Member
Licensed User
Longtime User
Hi Peter,
Yes you are right.. I just wanted to show that the Android client (must) be in landscape for now.. but also it would be nice if the server followed the client in orientation change
because if you want to put the phone somewhere in fixed position, then user will be able to mount it in the orientation they want according to available space or need.
I can't edit the server because I don't have C# compiler, but this could be done if a header is sent in the beginning of the communication that will configure the server for landscape or portrait, size of server window... etc.
But I understand this is a demo and tutorial and developers can customize it as they wish.
this is old i know ... i hope this will be still usefull
https://www.b4x.com/android/forum/threads/cctv-cool-php-fixes-awesome-awesome-awesome.76534/
 
Upvote 0
Top