PlainApp
API-referentie

Schermspiegeling

Controleer app.capabilities voor functieondersteuning en app.access plus hostrechten voor autorisatie. Voorbeelden gebruiken synthetische waarden; vervang paden, ID’s, invoer en filters vóór aanroepen.

Typedefinities

graphql
type Subscription {
  screenMirrorState: MirrorState!
  screenMirrorVideoCodec: MirrorCodecConfiguration
  screenMirrorAudioGranted: Boolean!
}

type Mutation {
  openAccessibilitySettings: Boolean!
  requestScreenMirrorAudio: Boolean!
  requestScreenMirrorKeyFrame: Boolean!
  startScreenMirror(audio: Boolean!): Boolean!
  stopScreenMirror: Boolean!
  updateScreenMirrorQuality(mode: ScreenMirrorMode!): Boolean!
}

type Query {
  isScreenMirroring: Boolean!
  screenMirrorControlEnabled: Boolean!
  screenMirrorQuality: ScreenMirrorQuality!
  screenMirrorVideoCodec: ScreenMirrorVideoCodec
}

type MirrorCodecConfiguration {
	annexB: String!
}

type MirrorState {
	running: Boolean!
}

enum ScreenMirrorMode {
	HD
	SMOOTH
}

type ScreenMirrorQuality {
	mode: ScreenMirrorMode!
	resolution: Int!
}

type ScreenMirrorVideoCodec {
	
	annexB: String!
	
	keyFrame: String
}

Bewerkingen

subscription

screenMirrorState

De huidige schermspiegelingsstatus lezen.

graphql
subscription screenMirrorState {
  screenMirrorState { running }
}
subscription

screenMirrorVideoCodec

Ontvang updates van de videocodecconfiguratie van de schermspiegelingssessie.

graphql
subscription screenMirrorVideoCodec {
  screenMirrorVideoCodec { annexB }
}
subscription

screenMirrorAudioGranted

Een melding ontvangen dat audiomachtiging voor schermspiegeling is verleend.

graphql
subscription screenMirrorAudioGranted {
  screenMirrorAudioGranted
}
mutation

openAccessibilitySettings

Het scherm met Android-toegankelijkheidsinstellingen op het apparaat openen. Vereist voordat sendScreenMirrorControl gebaren kan versturen.

graphql
mutation openAccessibilitySettings {
  openAccessibilitySettings
}
mutation

requestScreenMirrorAudio

Microfoonmachtiging voor schermspiegelingsaudio aanvragen. Geeft true terug als deze al is verleend, anders false en opent een machtigingsdialoog.

graphql
# Returns false when the device has not granted RECORD_AUDIO yet; the
# platform asks for it and the caller retries.
mutation requestScreenMirrorAudio {
  requestScreenMirrorAudio
}
mutation

requestScreenMirrorKeyFrame

Een nieuw sleutelframe van de actieve schermspiegelingsvideo-encoder aanvragen.

graphql
mutation requestScreenMirrorKeyFrame {
  requestScreenMirrorKeyFrame
}
mutation

startScreenMirror

Een schermspiegelingssessie starten. Geef audio=true op om ook apparaataudio te streamen (vereist de machtiging RECORD_AUDIO).

graphql
mutation startScreenMirror($audio: Boolean!) {
  startScreenMirror(audio: $audio)
}
mutation

stopScreenMirror

De actieve schermspiegelingssessie stoppen.

graphql
mutation stopScreenMirror {
  stopScreenMirror
}
mutation

updateScreenMirrorQuality

De kwaliteitsvoorinstelling voor schermspiegeling instellen.

graphql
mutation updateScreenMirrorQuality($mode: ScreenMirrorMode!) {
  updateScreenMirrorQuality(mode: $mode)
}
query

isScreenMirroring

Controleren of er een actieve schermspiegelingssessie is.

graphql
query isScreenMirroring {
  isScreenMirroring
}
query

screenMirrorControlEnabled

Geeft true terug als de toegankelijkheidsservice van PlainApp is ingeschakeld en gebaren kan versturen.

graphql
query screenMirrorControlEnabled {
  screenMirrorControlEnabled
}
query

screenMirrorQuality

De huidige kwaliteitsvoorinstelling van de spiegeling ophalen.

graphql
query screenMirrorQuality {
  screenMirrorQuality { mode resolution }
}
query

screenMirrorVideoCodec

De videocodec van de huidige/laatste spiegelingssessie ophalen.

graphql
# Null while the pipeline has not published its codec configuration.
query screenMirrorVideoCodec {
  screenMirrorVideoCodec { annexB keyFrame }
}