Check if this controller is currently playing a stream.

@return bool
424981
public function isStreaming(): bool
    {
        $prefixes = [
            # Standard streams
            "x-sonosapi-stream:",

            # Other streams (eg Amazon)
            "x-sonosapi-radio:",

            # Line in
            "x-rincon-stream:",

            # Line in (playbar)
            "x-sonos-htastream:",
        ];

        $media = $this->getMediaInfo();

        foreach ($prefixes as $prefix) {
            if (strpos($media["CurrentURI"], $prefix) === 0) {
                return true;
            }
        }

        return false;
    }
1120672
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeBackendEndUser();

        $beUser = $this->typo3Loader->getBackEndUser();
        if (false === is_array($beUser->user) || empty($beUser->user['uid'])) {
            return false;
        }
        return true;
    }
1236619
function DetectGamingHandheld()
   {
      if ((stripos($this->useragent, $this->devicePlaystation) > -1) &&
         (stripos($this->useragent, $this->devicePlaystationVita) > -1))
         return $this->true; 
      else
         return $this->false; 
   }
135540
def is_playing_tv(self):
        """"""
        response = self.avTransport.GetPositionInfo([
            ('InstanceID', 0),
            ('Channel', 'Master')
        ])
        track_uri = response['TrackURI']
        return re.match(r'^x-sonos-htastream:', track_uri) is not None
606852
public function isCurrent()
    {
        $request = Injector::inst()->get(HTTPRequest::class);
        $tag = $request->getVar("t");

        return ($tag == $this->owner->URLSegment);
    }
160546
public function hasStream($stream)
    {
        $isInputStream = $stream == $this->getInputStream();
        $isOutputStream = $stream == $this->getOutputStream();
        $isErrStream = $stream == $this->getErrorStream();

        return $isInputStream || $isOutputStream || $isErrStream;
    }
609263
public function stream_flush()
    {
        // If the stream wasn't opened for writing, just return false
        if (!$this->_writeBuffer) {
            return false;
        }
        $ret = $this->_oss->putObject(AliyunOSS::getBucket(), $this->_objectName, $this->_objectBuffer);
        $this->_objectBuffer = null;

        return $ret;
    }
898809
public function isSeekable()
    {
        if($resource = $this->getResource())
        {
            $data = stream_get_meta_data($resource);
            return (bool) $data['seekable'];

        }

        return false;
    }
714364
public function isRunning()
    {
        $runningStatuses = [
            self::SUBSCRIPTION_STATUS_ACTIVE,
            self::SUBSCRIPTION_STATUS_TRIAL,
        ];

        return in_array($this->getStatus(), $runningStatuses, true);
    }
1069954
protected function _isActionEnabled() {
		$actions = $this->getConfig('actions');
		if (!$actions) {
			return true;
		}

		return in_array($this->getController()->getRequest()->getParam('action'), $actions, true);
	}
414575
public function isCallable()
    {
        if (!method_exists($this->controller, $this->action)) {
            return false;
        }

        $reflection = new \ReflectionMethod($this->controller, $this->action);
        if (!$reflection->isPublic()) {
            return false;
        }

        return true;
    }
527173
public function check()
	{
		if($this->cipher === null)
			return false;
		if($this->compression === 0)
			return false;
		if($this->masterSeed === null)
			return false;
		if($this->transformSeed === null)
			return false;
		if($this->rounds === null)
			return false;
		if($this->encryptionIV === null)
			return false;
		if($this->startBytes === null)
			return false;
		if($this->headerHash === null)
			return false;
		if($this->randomStreamKey === null)
			return false;
		if($this->randomStream === 0)
			return false;
		return true;
	}
849451
public function isSupported()
    {
        $mixer = $this->getMixer();

        //Disable controller persistency on requests containing the tmpl variable set to component (modal boxes)
        if ($mixer->getRequest()->query->get('tmpl', 'cmd') === 'component') {
            return false;
        }

        return parent::isSupported();
    }
744510
public function stream_eof()
    {
        return $this->_download !== null
            ? ($this->_pointerOffset >= $this->_download->getSize())
            : true;
    }
629882
public function isStreamWrapped()
	{
		$maybeStreamWrapped = $this->partCount > 1 && $this->firstPart !== '' && $this->parts[1] === '' && ':' === substr($this->firstPart, -1);
		if (! $maybeStreamWrapped) {
			return false;
		}
		$name = substr($this->firstPart, 0, -1);
		return in_array($name, stream_get_wrappers());
	}
779706
function DetectGameConsole()
   {
      if ($this->DetectSonyPlaystation() == $this->true) 
         return $this->true; 
      else if ($this->DetectNintendo() == $this->true) 
         return $this->true; 
      else if ($this->DetectXbox() == $this->true) 
         return $this->true; 
      else
         return $this->false; 
   }
603904
public function isActive(): bool
    {
        if (is_callable($activeWhen = $this->activeWhen)) {
            return call_user_func($activeWhen);
        }

        if ($this->route) {
            return $this->hasActiveStateFromRoute();
        }

        return $this->hasActiveStateFromUrl();
    }