feat: implement video crawler

This commit is contained in:
lilong.129
2023-04-28 21:48:59 +08:00
parent 8498fe10e3
commit 68dc545f35
7 changed files with 208 additions and 46 deletions

View File

@@ -251,8 +251,9 @@ type AppInfo struct {
}
type AppBaseInfo struct {
Pid int `json:"pid"`
BundleId string `json:"bundleId"`
Pid int `json:"pid,omitempty"`
BundleId string `json:"bundleId"` // package name for android
Activity string // view controller for ios
}
type AppState int
@@ -579,6 +580,11 @@ type Device interface {
StopPcap() string
}
type ForegroundApp struct {
PackageName string
Activity string
}
// WebDriver defines methods supported by WebDriver drivers.
type WebDriver interface {
// NewSession starts a new session and returns the SessionInfo.
@@ -623,8 +629,8 @@ type WebDriver interface {
GetLastLaunchedApp() string
// AssertAppForeground returns nil if the given package is in foreground
AssertAppForeground(packageName string) error
// GetForegroundApp returns current foreground app package name
GetForegroundApp() (string, error)
// GetForegroundApp returns current foreground app package name and activity name
GetForegroundApp() (app AppInfo, err error)
// StartCamera Starts a new camera for recording
StartCamera() error