public function startPlaying($liveCallUuid, array $urls, array $optionalArgs = [])
    {
        if (empty($liveCallUuid)) {
            throw new PlivoValidationException(
                "Which call to play in? No callUuid given");
        }

        if (empty($urls)) {
            throw new PlivoValidationException(
                "urls cannot be null");
        }

        $response = $this->client->update(
            $this->uri . $liveCallUuid . '/Play/',
            array_merge(
                ['urls' => join(',', $urls)],
                $optionalArgs)
        );

        $responseContents = $response->getContent();

        if(!array_key_exists("error",$responseContents)){
            return new ResponseUpdate(
                $responseContents['api_id'],
                $responseContents['message'],
                $response->getStatusCode()
            );
        } else {
            throw new PlivoResponseException(
                $responseContents['error'],
                0,
                null,
                $response->getContent(),
                $response->getStatusCode()

            );
        }

        
    }
public function startPlaying($liveCallUuid, array $urls, array $optionalArgs = [])
    {
        if (empty($liveCallUuid)) {
            throw new PlivoValidationException(
                "Which call to play in? No callUuid given");
        }

        if (empty($urls)) {
            throw new PlivoValidationException(
                "urls cannot be null");
        }

        $response = $this->client->update(
            $this->uri . $liveCallUuid . '/Play/',
            array_merge(
                ['urls' => join(',', $urls)],
                $optionalArgs)
        );

        $responseContents = $response->getContent();

        if(!array_key_exists("error",$responseContents)){
            return new ResponseUpdate(
                $responseContents['api_id'],
                $responseContents['message'],
                $response->getStatusCode()
            );
        } else {
            throw new PlivoResponseException(
                $responseContents['error'],
                0,
                null,
                $response->getContent(),
                $response->getStatusCode()

            );
        }

        
    }
public function startPlaying ( $ liveCallUuid , array $ urls , array $ optionalArgs = [ ] ) { if ( empty ( $ liveCallUuid ) ) { throw new PlivoValidationException ( "Which call to play in? No callUuid given" ) ; } if ( empty ( $ urls ) ) { throw new PlivoValidationException ( "urls cannot be null" ) ; } $ response = $ this -> client -> update ( $ this -> uri . $ liveCallUuid . '/Play/' , array_merge ( [ 'urls' => join ( ',' , $ urls ) ] , $ optionalArgs ) ) ; $ responseContents = $ response -> getContent ( ) ; if ( ! array_key_exists ( "error" , $ responseContents ) ) { return new ResponseUpdate ( $ responseContents [ 'api_id' ] , $ responseContents [ 'message' ] , $ response -> getStatusCode ( ) ) ; } else { throw new PlivoResponseException ( $ responseContents [ 'error' ] , 0 , null , $ response -> getContent ( ) , $ response -> getStatusCode ( ) ) ; } }
Start playing audio in a live call

@param string $liveCallUuid
@param array $urls
@param array $optionalArgs
+ Valid arguments with their types
+ [array of strings] urls - A single URL or a list of comma separated URLs linking to an mp3 or wav file.
+ [int] length - Maximum length in seconds that the audio should be played.
+ [string] legs - The leg on which the music will be played, can be aleg (i.e., A-leg is the first leg of the call or current call), bleg (i.e., B-leg is the second leg of the call),or both (i.e., both legs of the call).
+ [boolean] loop - If set to true, the audio file will play indefinitely.
+ [boolean] mix - If set to true, sounds are mixed with current audio flow.
@return ResponseUpdate
@throws PlivoValidationException
Start playing audio in a live call