The duration in seconds of the part of the break to be prefetched. This field is only relevant if prefetch is enabled. You should set this duration to as long as possible to increase the benefits of prefetching, but not longer than the shortest ad break expected. For example, for a live event with 30s and 60s ad breaks, the initial duration should be set to 30s.
getEnabled
Required. Indicates whether the option to prefetch ad requests is enabled.
Returns
Type
Description
bool
setEnabled
Required. Indicates whether the option to prefetch ad requests is enabled.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getInitialAdRequestDuration
The duration in seconds of the part of the break to be prefetched.
This field is only relevant if prefetch is enabled.
You should set this duration to as long as possible to increase the
benefits of prefetching, but not longer than the shortest ad break
expected. For example, for a live event with 30s and 60s ad breaks, the
initial duration should be set to 30s.
The duration in seconds of the part of the break to be prefetched.
This field is only relevant if prefetch is enabled.
You should set this duration to as long as possible to increase the
benefits of prefetching, but not longer than the shortest ad break
expected. For example, for a live event with 30s and 60s ad breaks, the
initial duration should be set to 30s.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Video Stitcher V1 Client - Class PrefetchConfig (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-video-stitcher/latest/V1.PrefetchConfig)\n- [1.0.3](/php/docs/reference/cloud-video-stitcher/1.0.3/V1.PrefetchConfig)\n- [0.9.1](/php/docs/reference/cloud-video-stitcher/0.9.1/V1.PrefetchConfig)\n- [0.8.4](/php/docs/reference/cloud-video-stitcher/0.8.4/V1.PrefetchConfig)\n- [0.7.3](/php/docs/reference/cloud-video-stitcher/0.7.3/V1.PrefetchConfig)\n- [0.6.2](/php/docs/reference/cloud-video-stitcher/0.6.2/V1.PrefetchConfig)\n- [0.5.1](/php/docs/reference/cloud-video-stitcher/0.5.1/V1.PrefetchConfig)\n- [0.3.4](/php/docs/reference/cloud-video-stitcher/0.3.4/V1.PrefetchConfig) \nReference documentation and code samples for the Google Cloud Video Stitcher V1 Client class PrefetchConfig.\n\nThe configuration for prefetch ads.\n\nGenerated from protobuf message `google.cloud.video.stitcher.v1.PrefetchConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Video \\\\ Stitcher \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEnabled\n\nRequired. Indicates whether the option to prefetch ad requests is enabled.\n\n### setEnabled\n\nRequired. Indicates whether the option to prefetch ad requests is enabled.\n\n### getInitialAdRequestDuration\n\nThe duration in seconds of the part of the break to be prefetched.\n\nThis field is only relevant if prefetch is enabled.\nYou should set this duration to as long as possible to increase the\nbenefits of prefetching, but not longer than the shortest ad break\nexpected. For example, for a live event with 30s and 60s ad breaks, the\ninitial duration should be set to 30s.\n\n### hasInitialAdRequestDuration\n\n### clearInitialAdRequestDuration\n\n### setInitialAdRequestDuration\n\nThe duration in seconds of the part of the break to be prefetched.\n\nThis field is only relevant if prefetch is enabled.\nYou should set this duration to as long as possible to increase the\nbenefits of prefetching, but not longer than the shortest ad break\nexpected. For example, for a live event with 30s and 60s ad breaks, the\ninitial duration should be set to 30s."]]