Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding External Screen Support [Feature Request #11] #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattrussell7
Copy link

Added External Screen Support for all iOS devices whether through HDMI Out via Lightning/USB-C or Airplay Screen Mirroring.

Feature Request #11 discusses this.

@@ -61,8 +90,9 @@ - (void)viewDidLoad

_controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig presenceDelegate:self];
_inactivityTimer = nil;

_renderView = (StreamView*)[[UIView alloc] initWithFrame:self.view.frame];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not safe to cast a UIView to a StreamView.

Copy link
Author

@mattrussell7 mattrussell7 May 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgutman What would you suggest to be a better alternative? Should it be a split to a #IF os(iOS)? Is this due to StreamView being a possible OSView for non iOS devices?

if (UIScreen.screens.count > 1) {
[self prepExtScreen:UIScreen.screens.lastObject];
}
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the indentation got a bit mangled here

@stale stale bot added the stale label Aug 21, 2020
@moonlight-stream moonlight-stream deleted a comment from stale bot Aug 21, 2020
@stale stale bot removed the stale label Aug 21, 2020
@tristan-k
Copy link

Will this be merged anytime soon?

@jasonmp85
Copy link

What does this need to be merged? I hate playing in pillarbox on my TV, which is pretty much my main use case for this app

@tristan-k
Copy link

Still waiting for this one. Steam Link already does this albeit with black bars due to the aspect ratio of iPads.

@tristan-k tristan-k mentioned this pull request Jul 5, 2021
@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 8, 2022
@jasonmp85
Copy link

Ping to keep from closing.

@stale stale bot removed the stale label Jan 20, 2022
@marinobantli
Copy link

marinobantli commented Mar 1, 2022

Hello, I started working on this and got it to work for now. However, I've never coded in objective C before and there is some potential to optimize or better ways to solve it for sure.

For now, when you connect an external Display, it will automatically move the stream to the external screen in its native resolution and the iPad only shows a black screen (or the statistics overlay if you enabled it). If you unplug the monitor, it will move to the iPad screen again.

However, at the moment, i don't get it to work above 60Hz...

@tristan-k
Copy link

tristan-k commented Mar 9, 2022

@marinobantli Do you have a IPA binary available for testing?

@jasonmp85
Copy link

I've no Obj-C experience either, but give me an app and what I can do to get logs or debugging or whatever and I'll gladly help out.

@ReclusiveRychuRychu
Copy link

Hello, I started working on this and got it to work for now. However, I've never coded in objective C before and there is some potential to optimize or better ways to solve it for sure.

For now, when you connect an external Display, it will automatically move the stream to the external screen in its native resolution and the iPad only shows a black screen (or the statistics overlay if you enabled it). If you unplug the monitor, it will move to the iPad screen again.

However, at the moment, i don't get it to work above 60Hz...

This sounds amazing! and exactly what Moonlight needs. Can any devs implement this?

@marinobantli
Copy link

Sorry for the silence, as of now, the external screen works, but I can't get mouse scrolling and keyboard inputs to work on the external screen. Controller input works however.

I would like to implement a little "dashboard" which is displayed on the iPads screen whenever an external display is connected to be able to change the external resolution.

@ReclusiveRychuRychu
Copy link

ReclusiveRychuRychu commented Mar 16, 2022

Sorry for the silence, as of now, the external screen works, but I can't get mouse scrolling and keyboard inputs to work on the external screen. Controller input works however.

I would like to implement a little "dashboard" which is displayed on the iPads screen whenever an external display is connected to be able to change the external resolution.

No apologies necessary! You're solving the final piece of the puzzle for my ideal set up! As a controller user this sounds like all I'd need, but obviously making sure everything works properly is important, and the added dashboard sounds like a lovely QoL improvement.

I'd love to see @cgutman help you with this and get it implemented in the next version!

@jasonmp85
Copy link

To be clear, I need to take this branch, build it, and try it out?

@gsaker
Copy link

gsaker commented Jul 4, 2022

I would also love this feature to be added. Any updates?

@perroboc
Copy link

Ping! Just because I think this is a must 🙂

@marinobantli
Copy link

I will try to work on it again in a few weeks…
I’m absolutely new to Objective-C and what i have written so far will probably be obsolete / cleaner to code in the upcoming ipadOS 16 due to the new Stage Manager.

@beitincapital
Copy link

Hello - just wondering if anyone has made progress on this request? The feature would be an amazing addition to the iOS app.

@git-nerd
Copy link

git-nerd commented Dec 22, 2022

It would be great if this feature did not depend on stage manager, because there are ipads that don’t all run stage manager (like ipad mini).

@patroza
Copy link

patroza commented Jul 21, 2023

here's an updated fork that works https://github.com/patroza/moonlight-ios/pull/1/files

stage manager solutions are not useful for me because I dont have a pointing device like mouse connected to change the window to full screen on the external display. the external display is even just xreal air glasses.
so this solution is great as it functions similar to Apple TV, Netflix and steam link.

@jeff08568
Copy link

Can I use your fork or do we have to wait for merge

@patroza
Copy link

patroza commented Jul 22, 2023

Can I use your fork or do we have to wait for merge

Feel free

@jeff08568
Copy link

Can confirm it’s working as expected. However when I locked my screen I noticed the image becomes static/stopped moving? Is this an iOS limitation?

@patroza
Copy link

patroza commented Jul 23, 2023

Can confirm it’s working as expected. However when I locked my screen I noticed the image becomes static/stopped moving? Is this an iOS limitation?

Think so but unsure; how is the behavior with Netflix or TV app? Or Steam link

@jeff08568
Copy link

jeff08568 commented Jul 23, 2023

Can confirm it’s working as expected. However when I locked my screen I noticed the image becomes static/stopped moving? Is this an iOS limitation?

Think so but unsure; how is the behavior with Netflix or TV app? Or Steam link

I’ve tested Netflix, Plex and nPlayer, they all seem to work fine with screen off. Not sure about steam link though, will test tomorrow

Edit: I’ve tested Steam link, it behaves exactly as your forked version. Not sure how apps like Netflix got around this, although I doubt you can send any controller signal to iOS with the screen locked.

@patroza
Copy link

patroza commented Jul 24, 2023

I’ve tested Netflix, Plex and nPlayer, they all seem to work fine with screen off. Not sure about steam link though, will test tomorrow

Edit: I’ve tested Steam link, it behaves exactly as your forked version. Not sure how apps like Netflix got around this, although I doubt you can send any controller signal to iOS with the screen locked.

nice find! yea in my case I use controllers connected to my pc, so for me that would be fine. but I imagine for most other people it will be important.

@mikicof
Copy link

mikicof commented Nov 9, 2023

I'm very interested having this, can we go on with the PR?

@amirlpro
Copy link

Please prioritize this PR

@yichengchen
Copy link

yichengchen commented May 4, 2024

any progress on this?I try merge the pr with the master branch and it works. If there are any necessary change need to do before merge, I am willing to help.

@Rayray1099
Copy link

Any updates on the External Screen Support?

@Write
Copy link

Write commented Nov 4, 2024

Would love to see this too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.