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

How to test screen mirroring? #79

Open
treblam opened this issue Mar 27, 2019 · 6 comments
Open

How to test screen mirroring? #79

treblam opened this issue Mar 27, 2019 · 6 comments

Comments

@treblam
Copy link

treblam commented Mar 27, 2019

I have noticed the document said:

The library has experimental support for handling fairplay handshake (used in for example screen mirroring)

But when I open screen mirroring with iOS 12.1.4, the fairplay device is not displayed. I also tried to open screen mirroring on macOS 10.14.3, and it's not displayed too.

So how can I test fairplay with screen mirroring? Any help will be appreciated.

@treblam
Copy link
Author

treblam commented Mar 28, 2019

I have looked at the source code for a quite a while, and found this file (src/test/main.c) have airplay related test code in it, and it includes airplay.h, but there is no airplay.h and airplay.c files in the source code. @juhovh Would you please commit these files to the repo? otherwise the file src/test/main.c can't be properly compiled.

@juhovh
Copy link
Owner

juhovh commented Mar 29, 2019

Sorry for the bad documentation, the service needs to advertise itself properly as AppleTV to be able to show as a screen mirroring device. Also, I believe the used playfair DRM decryption code only works for iOS devices and not macOS.

If you want to make shairplay advertise itself please see the https://github.com/juhovh/shairplay/commits/handshake-test branch, but you should be aware that I might rebase this branch from time to time when I'm doing development. I haven't enabled it in the master branch, because the mirroring handshake support is not complete, currently it can only handle the audio handshakes.

I think the test code is out of date, should also update that.

@treblam
Copy link
Author

treblam commented Mar 30, 2019

The handshake-test branch seems to be missing one line of code, which caused my iOS 12.2 can't find airplay server, I have made a pull request to it.

And I'd like to know why playfair DRM decryption code only works for iOS devices but not macOS, is it because they use different decryption method?

I'm interested in making the mirroring handshake work, but I am a newbie in C language, if you can spend some time on this, and make it work, it would be great. Thanks.

@HuangKaiHuan
Copy link

HuangKaiHuan commented Apr 5, 2019

Sorry for the bad documentation, the service needs to advertise itself properly as AppleTV to be able to show as a screen mirroring device. Also, I believe the used playfair DRM decryption code only works for iOS devices and not macOS.

If you want to make shairplay advertise itself please see the https://github.com/juhovh/shairplay/commits/handshake-test branch, but you should be aware that I might rebase this branch from time to time when I'm doing development. I haven't enabled it in the master branch, because the mirroring handshake support is not complete, currently it can only handle the audio handshakes.

I think the test code is out of date, should also update that.

HI.
I find someone had implemented the mirror function in ios12 based on this project.https://github.com/dsafa22/AirplayServer. But it is for android system. I'm trying to merge his code to yours. But I'm not good at doing it.
I hope it will help you and I will continue to work hard.

@HuangKaiHuan
Copy link

I combine two pieces of code in https://github.com/561546441/shairplay
the mirroring handshake seem to be success。
But I can not find the mirroring stream from client.
Can you spend on a little of time to see why?
@juhovh

@drscotthawley
Copy link

drscotthawley commented Jan 14, 2021

Same problem here: Configured with ./configure --with-playfair but shairplay instance never appears on iPhone's screen mirroring list. (iOS 14)

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

No branches or pull requests

4 participants