Casting
Check app.capabilities for feature support and app.access plus host permissions for authorization. Examples use synthetic values; replace paths, IDs, inputs and filters before calling.
Type Definitions
type Mutation {
addDlnaItem(item: DlnaMediaInput!): DlnaSenderState!
castDlnaMedia(item: DlnaMediaInput!): DlnaSenderState!
clearDlnaItems: DlnaSenderState!
dlnaCast(rendererUdn: String!, url: String!, title: String!, mime: String!, type: DlnaCastType!): Boolean!
exitDlna: DlnaSenderState!
pauseDlna: DlnaSenderState!
playDlna: DlnaSenderState!
removeDlnaItem(path: String!): DlnaSenderState!
removeDlnaItemAt(index: Int!): DlnaSenderState!
reorderDlnaItems(from: Int!, to: Int!): DlnaSenderState!
seekDlna(positionMs: Long!): DlnaSenderState!
selectDlnaDevice(id: ID!): DlnaSenderState!
startDlnaScan: DlnaSenderState!
stopDlna: DlnaSenderState!
stopDlnaScan: DlnaSenderState!
}
type Query {
dlnaRenderers: [DlnaRenderer!]!
dlnaSenderState: DlnaSenderState!
}
type Subscription {
dlnaSenderChanged: DlnaSenderState!
}
enum DlnaCastType {
AUDIO
VIDEO
IMAGE
}
input DlnaMediaInput {
path: String!
title: String!
albumArt: String! = ""
artist: String! = ""
durationMs: Long! = 0
type: DlnaCastType!
}
type DlnaRenderer {
udn: String!
name: String!
manufacturer: String
modelName: String
location: String!
}
type DlnaSenderDevice {
id: ID!
hostAddress: String!
name: String!
location: String!
}
type DlnaSenderMedia {
path: String!
title: String!
albumArt: String!
artist: String!
durationMs: Long!
type: DlnaCastType!
}
type DlnaSenderState {
version: Long!
devices: [DlnaSenderDevice!]!
currentDevice: DlnaSenderDevice
items: [DlnaSenderMedia!]!
currentUri: String!
playing: Boolean!
progressMs: Long!
durationMs: Long!
supportsCallback: Boolean!
}
scalar LongOperations
addDlnaItem
Append a media item to the DLNA sender queue.
mutation addDlnaItem($item: DlnaMediaInput!) {
addDlnaItem(item: $item) { version currentUri playing progressMs durationMs supportsCallback }
}castDlnaMedia
Cast the supplied media item using the DLNA sender.
mutation castDlnaMedia($item: DlnaMediaInput!) {
castDlnaMedia(item: $item) { version currentUri playing progressMs durationMs supportsCallback }
}clearDlnaItems
Clear the DLNA sender queue.
mutation clearDlnaItems {
clearDlnaItems { version currentUri playing progressMs durationMs supportsCallback }
}dlnaCast
Send a media URL and its metadata to the specified DLNA renderer.
mutation dlnaCast($rendererUdn: String!, $url: String!, $title: String!, $mime: String!, $type: DlnaCastType!) {
dlnaCast(rendererUdn: $rendererUdn, url: $url, title: $title, mime: $mime, type: $type)
}exitDlna
Exit the current DLNA sender session.
mutation exitDlna {
exitDlna { version currentUri playing progressMs durationMs supportsCallback }
}pauseDlna
Pause playback on the selected DLNA renderer.
mutation pauseDlna {
pauseDlna { version currentUri playing progressMs durationMs supportsCallback }
}playDlna
Start or resume playback on the selected DLNA renderer.
mutation playDlna {
playDlna { version currentUri playing progressMs durationMs supportsCallback }
}removeDlnaItem
Remove the queued DLNA item identified by its path.
mutation removeDlnaItem($path: String!) {
removeDlnaItem(path: $path) { version currentUri playing progressMs durationMs supportsCallback }
}removeDlnaItemAt
Remove the queued DLNA item at the specified index.
mutation removeDlnaItemAt($index: Int!) {
removeDlnaItemAt(index: $index) { version currentUri playing progressMs durationMs supportsCallback }
}reorderDlnaItems
Move a queued DLNA item from one index to another.
mutation reorderDlnaItems($from: Int!, $to: Int!) {
reorderDlnaItems(from: $from, to: $to) { version currentUri playing progressMs durationMs supportsCallback }
}seekDlna
Seek DLNA playback to a position in milliseconds.
mutation seekDlna($positionMs: Long!) {
seekDlna(positionMs: $positionMs) { version currentUri playing progressMs durationMs supportsCallback }
}selectDlnaDevice
Select a discovered DLNA renderer for playback.
mutation selectDlnaDevice($id: ID!) {
selectDlnaDevice(id: $id) { version currentUri playing progressMs durationMs supportsCallback }
}startDlnaScan
Start discovery of DLNA renderers.
mutation startDlnaScan {
startDlnaScan { version currentUri playing progressMs durationMs supportsCallback }
}stopDlna
Stop playback on the selected DLNA renderer.
mutation stopDlna {
stopDlna { version currentUri playing progressMs durationMs supportsCallback }
}stopDlnaScan
Stop discovery of DLNA renderers.
mutation stopDlnaScan {
stopDlnaScan { version currentUri playing progressMs durationMs supportsCallback }
}dlnaRenderers
List discovered DLNA renderers.
query dlnaRenderers {
dlnaRenderers { udn name manufacturer modelName location }
}dlnaSenderState
Read the current DLNA sender, queue and playback state without starting discovery.
query dlnaSenderState {
dlnaSenderState { version currentUri playing progressMs durationMs supportsCallback }
}dlnaSenderChanged
Receive the initial DLNA sender snapshot and subsequent sender-state changes.
subscription dlnaSenderChanged {
dlnaSenderChanged { version currentUri playing progressMs durationMs supportsCallback }
}