Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit c144a9c

Browse files
irataxysofislgcf-owl-bot[bot]
authored
docs(samples): add Video Stitcher VOD and live session code samples a… (#9)
* docs(samples): add Video Stitcher VOD and live session code samples and tests * Remove async from slate and live session before and after hooks * clean out old slates and CDN keys * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update SHA Co-authored-by: sofisl <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e032378 commit c144a9c

14 files changed

Lines changed: 984 additions & 34 deletions

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414

1515
docker:
16-
digest: sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6
16+
digest: sha256:3f802f47bce31df4ee6b9513ca085a049347dba6837a4bdfa411b77ae0a9bc43
1717
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,23 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-stitc
6363
| Sample | Source Code | Try it |
6464
| --------------------------- | --------------------------------- | ------ |
6565
| Create Cdn Key | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createCdnKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createCdnKey.js,samples/README.md) |
66+
| Create Live Session | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createLiveSession.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createLiveSession.js,samples/README.md) |
6667
| Create Slate | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createSlate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createSlate.js,samples/README.md) |
68+
| Create Vod Session | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createVodSession.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createVodSession.js,samples/README.md) |
6769
| Delete Cdn Key | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/deleteCdnKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/deleteCdnKey.js,samples/README.md) |
6870
| Delete Slate | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/deleteSlate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/deleteSlate.js,samples/README.md) |
6971
| Get Cdn Key | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getCdnKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getCdnKey.js,samples/README.md) |
72+
| Get Live Ad Tag Detail | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getLiveAdTagDetail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getLiveAdTagDetail.js,samples/README.md) |
73+
| Get Live Session | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getLiveSession.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getLiveSession.js,samples/README.md) |
7074
| Get Slate | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getSlate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getSlate.js,samples/README.md) |
75+
| Get Vod Ad Tag Detail | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodAdTagDetail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodAdTagDetail.js,samples/README.md) |
76+
| Get Vod Session | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodSession.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodSession.js,samples/README.md) |
77+
| Get Vod Stitch Detail | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodStitchDetail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodStitchDetail.js,samples/README.md) |
7178
| List Cdn Keys | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listCdnKeys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listCdnKeys.js,samples/README.md) |
79+
| List Live Ad Tag Details | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listLiveAdTagDetails.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listLiveAdTagDetails.js,samples/README.md) |
7280
| List Slates | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listSlates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listSlates.js,samples/README.md) |
81+
| List Vod Ad Tag Details | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listVodAdTagDetails.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listVodAdTagDetails.js,samples/README.md) |
82+
| List Vod Stitch Details | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listVodStitchDetails.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listVodStitchDetails.js,samples/README.md) |
7383
| Update Cdn Key | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/updateCdnKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/updateCdnKey.js,samples/README.md) |
7484
| Update Slate | [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/updateSlate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/updateSlate.js,samples/README.md) |
7585

samples/README.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,23 @@
1313
* [Before you begin](#before-you-begin)
1414
* [Samples](#samples)
1515
* [Create Cdn Key](#create-cdn-key)
16+
* [Create Live Session](#create-live-session)
1617
* [Create Slate](#create-slate)
18+
* [Create Vod Session](#create-vod-session)
1719
* [Delete Cdn Key](#delete-cdn-key)
1820
* [Delete Slate](#delete-slate)
1921
* [Get Cdn Key](#get-cdn-key)
22+
* [Get Live Ad Tag Detail](#get-live-ad-tag-detail)
23+
* [Get Live Session](#get-live-session)
2024
* [Get Slate](#get-slate)
25+
* [Get Vod Ad Tag Detail](#get-vod-ad-tag-detail)
26+
* [Get Vod Session](#get-vod-session)
27+
* [Get Vod Stitch Detail](#get-vod-stitch-detail)
2128
* [List Cdn Keys](#list-cdn-keys)
29+
* [List Live Ad Tag Details](#list-live-ad-tag-details)
2230
* [List Slates](#list-slates)
31+
* [List Vod Ad Tag Details](#list-vod-ad-tag-details)
32+
* [List Vod Stitch Details](#list-vod-stitch-details)
2333
* [Update Cdn Key](#update-cdn-key)
2434
* [Update Slate](#update-slate)
2535

@@ -55,6 +65,23 @@ __Usage:__
5565

5666

5767

68+
### Create Live Session
69+
70+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createLiveSession.js).
71+
72+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createLiveSession.js,samples/README.md)
73+
74+
__Usage:__
75+
76+
77+
`node samples/createLiveSession.js`
78+
79+
80+
-----
81+
82+
83+
84+
5885
### Create Slate
5986

6087
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createSlate.js).
@@ -72,6 +99,23 @@ __Usage:__
7299

73100

74101

102+
### Create Vod Session
103+
104+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/createVodSession.js).
105+
106+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/createVodSession.js,samples/README.md)
107+
108+
__Usage:__
109+
110+
111+
`node samples/createVodSession.js`
112+
113+
114+
-----
115+
116+
117+
118+
75119
### Delete Cdn Key
76120

77121
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/deleteCdnKey.js).
@@ -123,6 +167,40 @@ __Usage:__
123167

124168

125169

170+
### Get Live Ad Tag Detail
171+
172+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getLiveAdTagDetail.js).
173+
174+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getLiveAdTagDetail.js,samples/README.md)
175+
176+
__Usage:__
177+
178+
179+
`node samples/getLiveAdTagDetail.js`
180+
181+
182+
-----
183+
184+
185+
186+
187+
### Get Live Session
188+
189+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getLiveSession.js).
190+
191+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getLiveSession.js,samples/README.md)
192+
193+
__Usage:__
194+
195+
196+
`node samples/getLiveSession.js`
197+
198+
199+
-----
200+
201+
202+
203+
126204
### Get Slate
127205

128206
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getSlate.js).
@@ -140,6 +218,57 @@ __Usage:__
140218

141219

142220

221+
### Get Vod Ad Tag Detail
222+
223+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodAdTagDetail.js).
224+
225+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodAdTagDetail.js,samples/README.md)
226+
227+
__Usage:__
228+
229+
230+
`node samples/getVodAdTagDetail.js`
231+
232+
233+
-----
234+
235+
236+
237+
238+
### Get Vod Session
239+
240+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodSession.js).
241+
242+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodSession.js,samples/README.md)
243+
244+
__Usage:__
245+
246+
247+
`node samples/getVodSession.js`
248+
249+
250+
-----
251+
252+
253+
254+
255+
### Get Vod Stitch Detail
256+
257+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/getVodStitchDetail.js).
258+
259+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/getVodStitchDetail.js,samples/README.md)
260+
261+
__Usage:__
262+
263+
264+
`node samples/getVodStitchDetail.js`
265+
266+
267+
-----
268+
269+
270+
271+
143272
### List Cdn Keys
144273

145274
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listCdnKeys.js).
@@ -157,6 +286,23 @@ __Usage:__
157286

158287

159288

289+
### List Live Ad Tag Details
290+
291+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listLiveAdTagDetails.js).
292+
293+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listLiveAdTagDetails.js,samples/README.md)
294+
295+
__Usage:__
296+
297+
298+
`node samples/listLiveAdTagDetails.js`
299+
300+
301+
-----
302+
303+
304+
305+
160306
### List Slates
161307

162308
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listSlates.js).
@@ -174,6 +320,40 @@ __Usage:__
174320

175321

176322

323+
### List Vod Ad Tag Details
324+
325+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listVodAdTagDetails.js).
326+
327+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listVodAdTagDetails.js,samples/README.md)
328+
329+
__Usage:__
330+
331+
332+
`node samples/listVodAdTagDetails.js`
333+
334+
335+
-----
336+
337+
338+
339+
340+
### List Vod Stitch Details
341+
342+
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/listVodStitchDetails.js).
343+
344+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-stitcher&page=editor&open_in_editor=samples/listVodStitchDetails.js,samples/README.md)
345+
346+
__Usage:__
347+
348+
349+
`node samples/listVodStitchDetails.js`
350+
351+
352+
-----
353+
354+
355+
356+
177357
### Update Cdn Key
178358

179359
View the [source code](https://github.com/googleapis/nodejs-video-stitcher/blob/main/samples/updateCdnKey.js).

samples/createLiveSession.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/**
2+
* Copyright 2022, Google, Inc.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
'use strict';
17+
18+
function main(projectId, location, sourceUri, adTagUri, slateId) {
19+
// [START video_stitcher_create_live_session]
20+
/**
21+
* TODO(developer): Uncomment these variables before running the sample.
22+
*/
23+
// projectId = 'my-project-id';
24+
// location = 'us-central1';
25+
// sourceUri = 'https://storage.googleapis.com/my-bucket/main.mpd';
26+
// Single Inline Linear (https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/tags)
27+
// (https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/tags)
28+
// adTagUri = 'https://pubads.g.doubleclick.net/gampad/ads...';
29+
// slateId = 'my-slate';
30+
31+
// Imports the Video Stitcher library
32+
const {VideoStitcherServiceClient} =
33+
require('@google-cloud/video-stitcher').v1;
34+
// Instantiates a client
35+
const stitcherClient = new VideoStitcherServiceClient();
36+
37+
async function createLiveSession() {
38+
// Construct request
39+
const request = {
40+
parent: stitcherClient.locationPath(projectId, location),
41+
liveSession: {
42+
sourceUri: sourceUri,
43+
adTagMap: {
44+
default: {
45+
uri: adTagUri,
46+
},
47+
},
48+
defaultSlateId: slateId,
49+
},
50+
};
51+
52+
const [session] = await stitcherClient.createLiveSession(request);
53+
console.log(`Live session: ${session.name}`);
54+
console.log(`Play URI: ${session.playUri}`);
55+
}
56+
57+
createLiveSession();
58+
// [END video_stitcher_create_live_session]
59+
}
60+
61+
// node createLiveSession.js <projectId> <location> <sourceUri> <adTagUri> <slateId>
62+
process.on('unhandledRejection', err => {
63+
console.error(err.message);
64+
process.exitCode = 1;
65+
});
66+
main(...process.argv.slice(2));

samples/createVodSession.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* Copyright 2022, Google, Inc.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
'use strict';
17+
18+
function main(projectId, location, sourceUri, adTagUri) {
19+
// [START video_stitcher_create_vod_session]
20+
/**
21+
* TODO(developer): Uncomment these variables before running the sample.
22+
*/
23+
// projectId = 'my-project-id';
24+
// location = 'us-central1';
25+
// sourceUri = 'https://storage.googleapis.com/my-bucket/main.mpd';
26+
// See VMAP Pre-roll
27+
// (https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/tags)
28+
// adTagUri = 'https://pubads.g.doubleclick.net/gampad/ads...';
29+
30+
// Imports the Video Stitcher library
31+
const {VideoStitcherServiceClient} =
32+
require('@google-cloud/video-stitcher').v1;
33+
// Instantiates a client
34+
const stitcherClient = new VideoStitcherServiceClient();
35+
36+
async function createVodSession() {
37+
// Construct request
38+
const request = {
39+
parent: stitcherClient.locationPath(projectId, location),
40+
vodSession: {
41+
sourceUri: sourceUri,
42+
adTagUri: adTagUri,
43+
},
44+
};
45+
const [session] = await stitcherClient.createVodSession(request);
46+
console.log(`VOD session: ${session.name}`);
47+
}
48+
49+
createVodSession();
50+
// [END video_stitcher_create_vod_session]
51+
}
52+
53+
// node createVodSession.js <projectId> <location> <sourceUri> <adTagUri>
54+
process.on('unhandledRejection', err => {
55+
console.error(err.message);
56+
process.exitCode = 1;
57+
});
58+
main(...process.argv.slice(2));

0 commit comments

Comments
 (0)