@param $live

@throws VideoItemException

@return $this
199992
public function setLive($live)
    {
        self::writeFullTag(
            $live,
            'live',
            true,
            'video:live',
            $this->validator,
            'validateLive',
            $this->exception,
            'Provided live value is not a valid.'
        );

        return $this;
    }
172953
public function live($action = NULL, $recordingName = NULL)
        {
            try {

                $uri = "/recordings/live";

                if (is_null($action))
                    throw new Exception("action not specified or is null", 503);

                switch ($action) {
                    case "show":
                        $uri .= (!is_null($recordingName)) ? "/" . $recordingName : "";
                        $result = $this->pestObject->get($uri);
                        break;
                    default:
                        if (is_null($recordingName))
                            throw new Exception("recording name not specified or is null", 503);

                        $uri = "/recordings/live/" . $recordingName;
						$postData = array();

                        switch ($action) {
                            case "start":
                                throw new Exception("Starting a recording is done via channels interface - have you forgotten?", 503);
                                break;
                            case "stop":
                                $uri .= "/stop";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "discard":
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "pause":
                                $uri .= "/pause";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unpause":
                                $uri .= "/pause";
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "mute":
                                $uri .= "/mute";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unmute":
                                $uri .= "/mute";
                                $result = $this->pestObject->delete($uri);
                                break;
                            default:
                                throw new Exception("unknown action specified", 503);
                                break;
                        }
                        break;
                }

                return $result;

            } catch (Exception $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            }
        }
427655
public function video($video)
    {
        $oldSource = $this->source;
        $this->source = $video;

        $parsedURL = parse_url($video);

        // 1 thing, assume video.
        if (count($parsedURL) === 1) {
            $this->type = static::TYPE_VIDEO;
            $this->id = $parsedURL['path'];

            return $this;
        }

        // Youtu.be - Video
        if (strtolower($parsedURL['host']) == 'youtu.be') {
            $this->type = static::TYPE_VIDEO;
            $this->id = substr($parsedURL['path'], 1);

            return $this;
        }

        // Assume its a YouTube URL
        // check for /watch
        if (strtolower($parsedURL['path']) == '/watch') {
            $parsedQuery = explode('&', $parsedURL['query']);
            // Find v=
            foreach ($parsedQuery as $v) {
                if (substr(strtolower($v), 0, 2) == 'v=') {
                    $this->type = static::TYPE_VIDEO;
                    $this->id = substr($v, 2);

                    return $this;
                }
            }
        }

        // check for /v/
        if (substr(strtolower($parsedURL['path']), 0, 3) == '/v/') {
            $this->type = static::TYPE_VIDEO;
            $this->id = substr($parsedURL['path'], 0, 3);

            return $this;
        }

        $this->source = $oldSource;
        throw new AudioPlayerException('Could not identify video');
    }
436209
public function setLiveUpdateURL($liveUpdateURL = 'https://secure.epayment.ro/order/lu.php')
    {
        if (!is_string($liveUpdateURL)) {  //invalid data type
            return false;
        }

        if (empty($liveUpdateURL)) {   //empty string
            return false;
        }

        $this->liveUpdateURL = $liveUpdateURL; //everything is ok
        return true;
    }
1361286
public function setVideoCodec(Codec $codec)
	{
		if ($this->getAvailableVideoCodecs() && ! in_array($codec, $this->getAvailableVideoCodecs(), false))
		{
			throw new \InvalidArgumentException(sprintf('Wrong video codec value for "%s", available values are %s',
				$codec, implode(', ', $this->getAvailableVideoCodecs())));
		}
		
		$this->videoCodec = $codec;
		
		return $this;
	}
1265533
public function set(CacheItem $item): self
    {
        $driver = $this->getDriver();
        $driver->set($item->key, $item->value, $item->ttl);
        if ($this->hasEventListeners('itemSet')) {
            $this->dispatchEvent('itemSet', new \BearFramework\App\Cache\ItemSetEventDetails(clone($item)));
        }
        if ($this->hasEventListeners('itemChange')) {
            $this->dispatchEvent('itemChange', new \BearFramework\App\Cache\ItemChangeEventDetails($item->key));
        }
        return $this;
    }
272394
function with(array $options, $throwException = false)
    {
        $this->_view->with($options, $throwException);
        return $this;
    }
1108816
public function setVideoTitle($title)
    {
        $this->ensureMediaGroupIsNotNull();
        $this->getMediaGroup()->setTitle(
            new Zend_Gdata_Media_Extension_MediaTitle($title));
        return $this;
    }
161616
public function video($value, array $options = array(), $ns = 'og') {
        $this->tag($ns . ':video', $value, $options);

        return $this;
    }
1317928
public function addVideo($source = null, $attributes = [])
    {
        $validKeys = [
            'url',
            'secure_url',
            'type',
            'width',
            'height',
        ];

        $this->videoProperties[] = [
            $source,
            $this->cleanProperties($attributes, $validKeys),
        ];

        return $this;
    }
1323702
public function setDescription($description)
    {
        self::writeFullTag(
            $description,
            'description',
            true,
            'video:description',
            $this->validator,
            'validateDescription',
            $this->exception,
            'Provided description value is not a valid.'
        );

        return $this;
    }
751450
public static function create(string $source, Metadata $metadata = null): self
    {
        $videoItem = new self();

        $videoItem->source   = $source;
        $videoItem->metadata = $metadata;

        return $videoItem;
    }
395456
public function start($name = null): self
    {
        if (null !== $name) {
            $this->items[$name] = clone $this->items[self::BASE_ITEM];
            $this->activeItems[$name] = $item = $this->items[$name] ?? new Item($name);
            $item->start($name);

            return $this;
        }

        $this->activeItems[self::BASE_ITEM] = $item = $this->items[self::BASE_ITEM];
        $item->start(self::BASE_ITEM);

        return $this;
    }
1007359
public function setVideoBitrate($bitrate)
	{
		if ( ! is_numeric($bitrate) || $bitrate < 0)
		{
			throw new \InvalidArgumentException('The video bit rate value must be a integer type.');
		}
		
		$this->videoBitrate = (int) $bitrate;
		
		return $this;
	}
275571
private final void playLive() throws IOException {
        // change state
        subscriberStream.setState(StreamState.PLAYING);
        IMessageInput in = msgInReference.get();
        IMessageOutput out = msgOutReference.get();
        if (in != null && out != null) {
            // get the stream so that we can grab any metadata and decoder configs
            IBroadcastStream stream = (IBroadcastStream) ((IBroadcastScope) in).getClientBroadcastStream();
            // prevent an NPE when a play list is created and then immediately flushed
            int ts = 0;
            if (stream != null) {
                Notify metaData = stream.getMetaData();
                //check for metadata to send
                if (metaData != null) {
                    ts = metaData.getTimestamp();
                    log.debug("Metadata is available");
                    RTMPMessage metaMsg = RTMPMessage.build(metaData, metaData.getTimestamp());
                    sendMessage(metaMsg);
                } else {
                    log.debug("No metadata available");
                }
                IStreamCodecInfo codecInfo = stream.getCodecInfo();
                log.debug("Codec info: {}", codecInfo);
                if (codecInfo instanceof StreamCodecInfo) {
                    StreamCodecInfo info = (StreamCodecInfo) codecInfo;
                    // handle video codec with configuration
                    IVideoStreamCodec videoCodec = info.getVideoCodec();
                    log.debug("Video codec: {}", videoCodec);
                    if (videoCodec != null) {
                        // check for decoder configuration to send
                        IoBuffer config = videoCodec.getDecoderConfiguration();
                        if (config != null) {
                            log.debug("Decoder configuration is available for {}", videoCodec.getName());
                            VideoData conf = new VideoData(config, true);
                            log.debug("Pushing video decoder configuration");
                            sendMessage(RTMPMessage.build(conf, ts));
                        }
                        // check for keyframes to send
                        FrameData[] keyFrames = videoCodec.getKeyframes();
                        for (FrameData keyframe : keyFrames) {
                            log.debug("Keyframe is available");
                            VideoData video = new VideoData(keyframe.getFrame(), true);
                            log.debug("Pushing keyframe");
                            sendMessage(RTMPMessage.build(video, ts));
                        }
                    } else {
                        log.debug("No video decoder configuration available");
                    }
                    // handle audio codec with configuration
                    IAudioStreamCodec audioCodec = info.getAudioCodec();
                    log.debug("Audio codec: {}", audioCodec);
                    if (audioCodec != null) {
                        // check for decoder configuration to send
                        IoBuffer config = audioCodec.getDecoderConfiguration();
                        if (config != null) {
                            log.debug("Decoder configuration is available for {}", audioCodec.getName());
                            AudioData conf = new AudioData(config.asReadOnlyBuffer());
                            log.debug("Pushing audio decoder configuration");
                            sendMessage(RTMPMessage.build(conf, ts));
                        }
                    } else {
                        log.debug("No audio decoder configuration available");
                    }
                }
            }
        } else {
            throw new IOException(String.format("A message pipe is null - in: %b out: %b", (msgInReference == null), (msgOutReference == null)));
        }
        configsDone = true;
    }
1314864
public function lastMoveIsPlayed()
    {
        $moves = $this->getMoveHistory();
        $offset = count($moves) - 1;
        $last_item = $this->moves[$offset];
        $this->moves[$offset][key($last_item)] = true;
        return $this;
    }
644860
public function setProviderId($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->provider_id !== $v) {
            $this->provider_id = $v;
            $this->modifiedColumns[VideoTableMap::COL_PROVIDER_ID] = true;
        }

        return $this;
    }