pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.53k stars 771 forks source link

java.lang.Security.Exception:Invalid media projection #536

Closed icewst closed 3 years ago

icewst commented 4 years ago

java.lang.Security.Exception:Invalid media projection

DisplayBase

mediaProjection = mediaProjectionManager.getMediaProjection(resultCode, data);

If you use the last "mediaProjection", then this error will occur. Almost inevitable. Every time you create a new one, it's normal.

vivo x9s 8.1.0

pedroSG94 commented 4 years ago

I can't reproduce your error. Can you explain how to reproduce it? Are you using example app?

icewst commented 4 years ago

I can't reproduce your error. Can you explain how to reproduce it? Are you using example app?

Only appeared on an old phone, other phones are normal. The second time, it will appear.