Using the Node JS client, I can't get the Transcoder API to accept the pub/sub destination.
The documentation variously says to configure the pubsub_destination
field or the pubsubDestination
field, but neither appear to work when creating a job using the createJob
method (following and extending the example for ad-hoc job creation).
const config = {
parent: client.locationPath(projectId, location),
job: {
inputUri: inputUri,
outputUri: outputUri,
config: {
elementaryStreams: [
{
key: 'video-stream0',
videoStream: {
h264: {
heightPixels: 360,
widthPixels: 640,
bitrateBps: 550000,
frameRate: 60
}
}
},
{
key: 'audio-stream0',
audioStream: {
codec: 'aac',
bitrateBps: 64000
}
}
],
muxStreams: [
{
elementaryStreams: ['video-stream0', 'audio-stream0'],
key: 'sd',
filename: 'sd.mp4',
container: 'mp4'
}
]
},
pubsubDestination: { topic: `projects/${projectId}/topics/transcoder` }
}
};
return await client.createJob(request);
The job gets created and completes successfully, but the config field of the created job shows "pubsubDestination": null
.
What am I doing wrong?