-
-
Notifications
You must be signed in to change notification settings - Fork 218
feat: Add mobile wrappers for media-projection-based screen recording #748
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
Conversation
| * @returns {boolean} True if a new recording has successfully started. | ||
| * @throws {Error} If recording has failed to start or is not supported on the device under test. | ||
| */ | ||
| commands.mobileStartMediaProjectionRecording = async function mobileStartMediaProjectionRecording (options = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"mediaProjectionRecording" is an awful long string to have inside names everywhere :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could use mpRecording, not sure if it would be readable enough though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe for the internal code mp is fine, and keep the "mediaProjection" for the user-facing strings? not sure if that's easy to do.
it's not a huge deal, i just hate reading entire sentences as variable names :-)
lib/commands/media-projection.js
Outdated
| } | ||
|
|
||
| async isRunning () { | ||
| const stdout = await this.adb.shell(['dumpsys', 'activity', 'services']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like the result can be filtered by the package name/activity:
adb dumpsys activity services RECORDING_SERVICE_NAME
I haven't verified well, but potentially does this have slightly better performance rather than getting all services...?
Empty result:
ACTIVITY MANAGER SERVICES (dumpsys activity services)
(nothing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
# [5.2.0](v5.1.0...v5.2.0) (2022-06-21) ### Features * Add mobile wrappers for media-projection-based screen recording ([#748](#748)) ([501ac72](501ac72))
|
🎉 This PR is included in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Based on appium/io.appium.settings#88