Show Slate on Channel.

@param Channel|string $channel Channel data or channel Id
@param $duration
@param $assetId

@return bool true if succeeded
357322
public function showSlateChannel($channel, $duration, $assetId)
    {
        $op = $this->sendShowSlateChannelOperation($channel, $duration, $assetId);

        // waiting for create operation finishes
        $op = $this->awaitOperation($op);

        // true if succeeded
        return $op->getState() == OperationState::Succeeded;
    }
907940
public final S withDeadlineAfter(long duration, TimeUnit unit) {
    return build(channel, callOptions.withDeadlineAfter(duration, unit));
  }
1114434
public function markAssetAsIncluded($assetType, $assetHandle = false)
    {
        $list = AssetList::getInstance();
        if ($assetType && $assetHandle) {
            $asset = $list->getAsset($assetType, $assetHandle);
        } else {
            $assetGroup = $list->getAssetGroup($assetType);
        }

        if (isset($assetGroup)) {
            $this->providedAssetGroup->addGroup($assetGroup);
        } elseif (isset($asset)) {
            $ap = new AssetPointer($asset->getAssetType(), $asset->getAssetHandle());
            $this->providedAssetGroup->add($ap);
        } else {
            $ap = new AssetPointer($assetType, $assetHandle);
            $this->providedAssetGroupUnmatched[] = $ap;
        }
    }
561602
def show_channel(self, channel, owner):
        '''
        '''
        url = '%s/channels/%s/%s' % (self.domain, owner, channel)

        res = self.session.get(url)
        self._check_response(res, [200])
        return res.json()
39483
public static function createFromStartAndDuration(DateTimeOfDay $start, Duration $duration)
    {
        return static::create($start, $start->add($duration));
    }
254691
public function setDuration($duration)
    {
        self::writeFullTag(
            $duration,
            'duration',
            true,
            'video:duration',
            $this->validator,
            'validateDuration',
            $this->exception,
            'Provided duration value is not a valid.'
        );

        return $this;
    }
533339
public static function debug($message, $context = [], $channel = 'tastphp.logger')
    {

        $logger = static::getLoggerByLevelAndChannel(Monolog::DEBUG, $channel);
        $logger->addDebug($message, $context);
    }
1365151
protected function loggingFileAsset($assets, $type = self::ASSET_CSS_FILE, array $options = [], $key = null)
    {
        if (!$assets) {
            throw new InvalidArgumentException('The 1th param [$assets] is can\'t empty.');
        }

        $pos = trim($options['position']);
        $this->checkTypeAndPosition($type, $pos);

        foreach ((array)$assets as $name => $asset) {
            $asset = trim($asset);

            // check asset url
            if (\in_array($type, [self::ASSET_JS_FILE, self::ASSET_CSS_FILE], true)) {
                $asset = AssetLoad::buildUrl($asset, $this->getBaseUrl(), $this->basePath, false);
            }

            $tag = $this->buildTag($asset, $type);

            if (!is_numeric($name)) {
                // if ( $this->lockedCheck($name, $pos) ) {
                //     # code...
                // }

                $this->assets[$pos][$name] = $tag;
            } else {
                $this->assets[$pos][] = $tag;
            }
        }

        return $this;
    }
1128078
public function assign($media, $duration, $playlistId)
    {
        $this->playlistId = $playlistId;
        $this->media = $media;
        $this->getLogger()->info('Assigning Media To Playlist ' . $this->playlistId);
        $response = $this->doPost('/playlist/library/assign/' . $playlistId, [
        	'media' => $media,
            'duration' => $duration
        	]);

        // Parse response
        //  set properties
        $this->playlistId = $response['playlistId'];

        $this->getLogger()->debug('Creating child object Widgets and linking it to parent Playlist');
        // Set widgets property (with XiboWidget objects)
        foreach ($response['widgets'] as $widget) {
            $this->widgets[] = (new XiboWidget($this->getEntityProvider()))->hydrate($widget);
        }

        return $this;
    }
1041491
public function login($duration = 0)
    {
        if ($this->beforeLogin()) {
            $result = $this->webUser->login($this->getIdentity(), $this->rememberMe ? $duration : 0);
            if ($result) {
                $this->afterLogin();
            }

            return $result;
        }

        return false;
    }
318093
public function setDuration($duration)
    {
        if (is_null($duration)) {
            unset($this->_headers['content-duration']);
        } else {
            if (!($hdr = $this->_headers['content-duration'])) {
                $hdr = new Horde_Mime_Headers_Element_Single(
                    'Content-Duration',
                    ''
                );
                $this->_headers->addHeaderOb($hdr);
            }
            $hdr->setValue($duration);
        }
    }
1159324
public function logCommand($command, $duration, $connection, $error = false)
    {
        ++$this->nbCommands;

        if (null !== $this->logger) {
            $this->commands[] = array('cmd' => $command, 'executionMS' => $duration, 'conn' => $connection, 'error' => $error);
            if ($error) {
                $message = 'Command "' . $command . '" failed (' . $error . ')';

                $this->logger->error($message);
            } else {
                $this->logger->debug('Executing command "' . $command . '"');
            }
        }
    }
1176904
public function createNullSound($duration, $target)
    {
        if (empty($duration)) {
            $duration = 1;
        }

        $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false);
       
        $this->serviceLocator->get('playgroundcore_phpvideotoolkit')
            ->addPreInputCommand('-y')
            ->addCommand('-filter_complex', 'aevalsrc=0:d='.$duration)
            ->setOutputPath($target)
            ->execute();

        return $target;
    }
427714
public function plus(Duration $duration) : Duration
    {
        if ($duration->isZero()) {
            return $this;
        }

        $seconds = $this->seconds + $duration->seconds;
        $nanos = $this->nanos + $duration->nanos;

        if ($nanos >= LocalTime::NANOS_PER_SECOND) {
            $nanos -= LocalTime::NANOS_PER_SECOND;
            $seconds++;
        }

        return new Duration($seconds, $nanos);
    }
645025
public static function create_hold($mode, $channels, $response, $timeout = null)
    {
        $channels = self::parse_channels($channels);
        $ichannels = self::get_hold_channels($channels);
        $hold = array();
        $hold['mode'] = $mode;
        $hold['channels'] = $ichannels;
        if (!is_null($timeout)) {
            $hold['timeout'] = $timeout;
        }
        $iresponse = self::get_hold_response($response);
        $instruct = array();
        $instruct['hold'] = $hold;
        if (!is_null($iresponse)) {
            $instruct['response'] = $iresponse;
        }
        return json_encode($instruct);
    }
1029199
public T forTicks(int duration, int delay)
	{
		this.duration = Timer.tickToTime(duration);
		this.delay = Timer.tickToTime(delay);

		return self();
	}
400997
public function setContent($mimeType, $duration = null)
    {
        self::$xml['content'] = '<media:content';
        $this->setContentMimeType($mimeType);
        $this->setContentDuration($duration);
        self::$xml['content'] .= '>';

        return $this;
    }