Expand an adpod placement into a set of request objects according to the
total adpod duration and the range of duration seconds. Sets minduration/
maxduration video property according to requireExactDuration configuration
11812
function createAdPodRequest(tags, adPodBid) {
  const { durationRangeSec, requireExactDuration } = adPodBid.mediaTypes.video;

  const numberOfPlacements = getAdPodPlacementNumber(adPodBid.mediaTypes.video);
  const maxDuration = utils.getMaxValueFromArray(durationRangeSec);

  const tagToDuplicate = tags.filter(tag => tag.uuid === adPodBid.bidId);
  let request = utils.fill(...tagToDuplicate, numberOfPlacements);

  if (requireExactDuration) {
    const divider = Math.ceil(numberOfPlacements / durationRangeSec.length);
    const chunked = utils.chunk(request, divider);

    // each configured duration is set as min/maxduration for a subset of requests
    durationRangeSec.forEach((duration, index) => {
      chunked[index].map(tag => {
        setVideoProperty(tag, 'minduration', duration);
        setVideoProperty(tag, 'maxduration', duration);
      });
    });
  } else {
    // all maxdurations should be the same
    request.map(tag => setVideoProperty(tag, 'maxduration', maxDuration));
  }

  return request;
}
141493
public void setMezzanineFile(com.google.api.ads.admanager.axis.v201808.VideoRedirectAsset mezzanineFile) {
        this.mezzanineFile = mezzanineFile;
    }
1127653
function tryAddVideoBid(auctionInstance, bidResponse, bidRequests, afterBidAdded) {
  let addBid = true;

  const bidderRequest = getBidRequest(bidResponse.requestId, [bidRequests]);
  const videoMediaType =
  bidderRequest && deepAccess(bidderRequest, 'mediaTypes.video');
  const context = videoMediaType && deepAccess(videoMediaType, 'context');

  if (config.getConfig('cache.url') && context !== OUTSTREAM) {
    if (!bidResponse.videoCacheKey) {
      addBid = false;
      callPrebidCache(auctionInstance, bidResponse, afterBidAdded, bidderRequest);
    } else if (!bidResponse.vastUrl) {
      utils.logError('videoCacheKey specified but not required vastUrl for video bid');
      addBid = false;
    }
  }
  if (addBid) {
    addBidToAuction(auctionInstance, bidResponse);
    afterBidAdded();
  }
}
280733
public void createMaxArtifactDetailsTable() {
        maxArtifactDetailsTable = createArtifactDetailsTable();
        maxArtifactDetailsTable.setId(UIComponentIdProvider.UPLOAD_ARTIFACT_DETAILS_TABLE_MAX);
        maxArtifactDetailsTable.setContainerDataSource(artifactDetailsTable.getContainerDataSource());
        addGeneratedColumn(maxArtifactDetailsTable);
        if (!readOnly) {
            addGeneratedColumnButton(maxArtifactDetailsTable);
        }
        setTableColumnDetails(maxArtifactDetailsTable);
    }
984943
private void addPostParams(final Request request) {
        if (enableTurn != null) {
            request.addPostParam("EnableTurn", enableTurn.toString());
        }

        if (type != null) {
            request.addPostParam("Type", type.toString());
        }

        if (uniqueName != null) {
            request.addPostParam("UniqueName", uniqueName);
        }

        if (statusCallback != null) {
            request.addPostParam("StatusCallback", statusCallback.toString());
        }

        if (statusCallbackMethod != null) {
            request.addPostParam("StatusCallbackMethod", statusCallbackMethod.toString());
        }

        if (maxParticipants != null) {
            request.addPostParam("MaxParticipants", maxParticipants.toString());
        }

        if (recordParticipantsOnConnect != null) {
            request.addPostParam("RecordParticipantsOnConnect", recordParticipantsOnConnect.toString());
        }

        if (videoCodecs != null) {
            for (Room.VideoCodec prop : videoCodecs) {
                request.addPostParam("VideoCodecs", prop.toString());
            }
        }

        if (mediaRegion != null) {
            request.addPostParam("MediaRegion", mediaRegion);
        }
    }
845567
private void setMediaContentLength(String rangeHeader) {
    if (rangeHeader == null) {
      return;
    }
    if (mediaContentLength == 0) {
      mediaContentLength = Long.parseLong(rangeHeader.substring(rangeHeader.indexOf('/') + 1));
    }
  }
34475
public function setDuration($duration)
    {
        if ($duration < 0 || $duration > 28800) {
            throw new Exception\GoogleVideoUrlException(
                sprintf(
                    'The parameter %s must be a valid duration.see http://support.google.com/webmasters/bin/answer.py?hl=en&answer=80472#4',
                    $duration
                )
            );
        }

        $this->duration = $duration;

        return $this;
    }
1293915
public void seekTo(int milli) {
        checkState();
        if (!mPlayerPlaylist.isEmpty()) {
            PlaybackService.seekTo(getContext(), mClientKey, milli);
        }
    }
1231535
public static void setLeftDelay(Duration duration) {
        BEHAVIOR.setLeftDelay(duration == null ? Duration.millis(200) : duration);
    }
1062068
@Override
    public void addRequestContentLength(long contentLength) {
        if (contentLength < 0)
            throw new IllegalArgumentException();
        synchronized(lock) {
            if (this.requestContentLength == -1)
                this.requestContentLength = contentLength;
            else
                this.requestContentLength += contentLength;
        }
    }
851205
def set_content_length_range(self, min_length, max_length):
        
        err_msg = ('Min-length ({}) must be <= Max-length ({}), '
                   'and they must be non-negative.').format(
                       min_length, max_length
                   )
        if min_length > max_length or min_length < 0 or max_length < 0:
            raise ValueError(err_msg)

        self._content_length_range = (min_length, max_length)
1364244
public void setDuration(int index, Duration value)
   {
      set(selectField(ResourceFieldLists.CUSTOM_DURATION, index), value);
   }
30906
public void setVideoPositionSegment(com.google.api.ads.admanager.axis.v201808.VideoPositionTargeting videoPositionSegment) {
        this.videoPositionSegment = videoPositionSegment;
    }
1311406
public void setVideoAssets(com.google.api.ads.admanager.axis.v201811.VideoRedirectAsset[] videoAssets) {
        this.videoAssets = videoAssets;
    }
1132743
private void fillMissingDurations() {
        long[] extendedArray = new long[buildNumbers.length];
        Arrays.fill(extendedArray, -1);
        System.arraycopy(durations, 0, extendedArray, buildNumbers.length - durations.length, durations.length);
        durations = extendedArray;
    }
149605
def widen(self):
        """"""
        t, h = self.time, self.half_duration
        h *= self.scaling_coeff_x
        self.set_interval((t - h, t + h))
730374
protected void addSources(Video video, Media media) {
    Asset asset = getDamAsset(media);
    if (asset == null) {
      return;
    }

    for (VideoProfile profile : getVideoProfiles()) {
      com.day.cq.dam.api.Rendition rendition = profile.getRendition(asset);
      if (rendition != null) {
        video.createSource()
        .setType(profile.getHtmlType())
        .setSrc(urlHandler.get(rendition.getPath()).buildExternalResourceUrl(rendition.adaptTo(Resource.class)));
      }
    }
  }