Ekran Yansıtma
Özellik desteği için app.capabilities, yetkilendirme için app.access ve ana makine izinlerini kontrol edin. Çağrıdan önce örnek değerleri değiştirin.
Tip Tanımları
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
}İşlemler
screenMirrorState
Mevcut ekran yansıtma durumunu okur.
subscription screenMirrorState {
screenMirrorState { running }
}screenMirrorVideoCodec
Ekran yansıtma oturumunun video codec yapılandırması güncellemelerini alın.
subscription screenMirrorVideoCodec {
screenMirrorVideoCodec { annexB }
}screenMirrorAudioGranted
Ekran yansıtma ses izninin verildiği bildirimini alır.
subscription screenMirrorAudioGranted {
screenMirrorAudioGranted
}openAccessibilitySettings
Cihazda Android Erişilebilirlik ayarlarını açar. sendScreenMirrorControl hareket gönderebilmeden önce gereklidir.
mutation openAccessibilitySettings {
openAccessibilitySettings
}requestScreenMirrorAudio
Ekran yansıtma sesi için mikrofon izni ister. Zaten verilmişse true; değilse false döndürür (ve izin iletişim kutusu açar).
# Returns false when the device has not granted RECORD_AUDIO yet; the
# platform asks for it and the caller retries.
mutation requestScreenMirrorAudio {
requestScreenMirrorAudio
}requestScreenMirrorKeyFrame
Etkin ekran yansıtma video kodlayıcısından yeni anahtar kare ister.
mutation requestScreenMirrorKeyFrame {
requestScreenMirrorKeyFrame
}startScreenMirror
Ekran yansıtma oturumu başlatır. Cihaz sesini de aktarmak için audio=true geçin (RECORD_AUDIO izni gerekir).
mutation startScreenMirror($audio: Boolean!) {
startScreenMirror(audio: $audio)
}stopScreenMirror
Etkin ekran yansıtma oturumunu durdurur.
mutation stopScreenMirror {
stopScreenMirror
}updateScreenMirrorQuality
Ekran yansıtma kalite önayarını belirler.
mutation updateScreenMirrorQuality($mode: ScreenMirrorMode!) {
updateScreenMirrorQuality(mode: $mode)
}isScreenMirroring
Ekran yansıtma oturumunun etkin olup olmadığını denetler.
query isScreenMirroring {
isScreenMirroring
}screenMirrorControlEnabled
PlainApp Erişilebilirlik hizmeti etkin ve hareket gönderebilir olduğunda true döndürür.
query screenMirrorControlEnabled {
screenMirrorControlEnabled
}screenMirrorQuality
Mevcut yansıtma kalite önayarını getirir.
query screenMirrorQuality {
screenMirrorQuality { mode resolution }
}screenMirrorVideoCodec
Mevcut/son yansıtma oturumunun video codec'ini getirir.
# Null while the pipeline has not published its codec configuration.
query screenMirrorVideoCodec {
screenMirrorVideoCodec { annexB keyFrame }
}