| 31 | const livestreamServiceClient = new LivestreamServiceClient(); |
| 32 | |
| 33 | async function updateInput() { |
| 34 | // Construct request |
| 35 | const request = { |
| 36 | input: { |
| 37 | name: livestreamServiceClient.inputPath(projectId, location, inputId), |
| 38 | preprocessingConfig: { |
| 39 | crop: { |
| 40 | topPixels: 5, |
| 41 | bottomPixels: 5, |
| 42 | }, |
| 43 | }, |
| 44 | }, |
| 45 | updateMask: { |
| 46 | paths: ['preprocessing_config'], |
| 47 | }, |
| 48 | }; |
| 49 | |
| 50 | // Run request |
| 51 | const [operation] = await livestreamServiceClient.updateInput(request); |
| 52 | const response = await operation.promise(); |
| 53 | const [input] = response; |
| 54 | console.log(`Updated input: ${input.name}`); |
| 55 | } |
| 56 | |
| 57 | updateInput(); |
| 58 | // [END livestream_update_input] |