• 28-02-2022, 14:07:28
    #1
    Merhaba,
    Github reposudaki dosyaları indirdim. (https://github.com/vimeo/vimeo.php) aşağıdaki gibi bir kullanım yapmak istediğimde video başlık ve acıklama gözüküyor ama video dosyasını yüklemiyor bir hata mesajıda almıyorum. Sizce nerede hata yapıyorum.

    <?php
    require_once "autoload.php";
    use VimeoVimeo;

    $client = new Vimeo("","","");

    $file_name = __DIR__."/1.mp4";
    $uri = $client->upload($file_name);

    $response = $client->request($uri . '?fields=transcode.status');
    if ($response['body']['transcode']['status'] === 'complete') {
    print 'Your video finished transcoding.';
    } elseif ($response['body']['transcode']['status'] === 'in_progress') {
    print 'Your video is still transcoding.';
    } else {
    print 'Your video encountered an error during transcoding.';
    }

    $response = $client->request($uri . '?fields=link');
    echo "Your video link is: " . $response['body']['link'];
  • 01-03-2022, 22:19:12
    #2
    Merhaba,
    Bu konuda fikri olan yok sanırım. Teşekkürler.
  • 02-03-2022, 02:14:35
    #3
    Developer
    <?php
    require_once "autoload.php";
    use Vimeo\Vimeo;
    use Vimeo\Exceptions\VimeoUploadException;
    
    /* AYARLAR BAŞLANGIÇ */
    $config = [
        'client_id' => '',
        'client_secret' => '',
        'access_token' => ''
    ];
    
    $file_name = __DIR__."/1.mp4";
    $title = 'Video Title';
    $description = 'Video Description';
    /* AYARLAR BİTİŞ */
    
    $lib = new Vimeo($config['client_id'], $config['client_secret'], $config['access_token']);
    echo 'Uploading: ' . $file_name . "\n";
    
    try {
        // Upload the file and include the video title and description.
        $uri = $lib->upload($file_name, array(
            'name' => $title,
            'description' => $description
        ));
    
        // Get the metadata response from the upload and log out the Vimeo.com url
        $video_data = $lib->request($uri . '?fields=link');
        echo '"' . $file_name . ' has been uploaded to ' . $video_data['body']['link'] . "\n";
    
        // Make an API call to edit the title and description of the video.
        $lib->request($uri, array(
            'name' => $title,
            'description' => $description,
        ), 'PATCH');
    
        echo 'The title and description for ' . $uri . ' has been edited.' . "\n";
    
        // Make an API call to see if the video is finished transcoding.
        $video_data = $lib->request($uri . '?fields=transcode.status');
        echo 'The transcode status for ' . $uri . ' is: ' . $video_data['body']['transcode']['status'] . "\n";
    } catch (VimeoUploadException $e) {
        // We may have had an error. We can't resolve it here necessarily, so report it to the user.
        echo 'Error uploading ' . $file_name . "\n";
        echo 'Server reported: ' . $e->getMessage() . "\n";
    } catch (VimeoRequestException $e) {
        echo 'There was an error making the request.' . "\n";
        echo 'Server reported: ' . $e->getMessage() . "\n";
    }
    ?>
  • 02-03-2022, 11:20:40
    #4
    Merhaba,
    Zaman ayırdığın için öncelikle teşekkürler. Ben denememde gine başarılı olamadım nerede hata yaptığımı bulamadım bir türlü.

    brown adlı üyeden alıntı: mesajı görüntüle
    <?php
    require_once "autoload.php";
    use Vimeo\Vimeo;
    use Vimeo\Exceptions\VimeoUploadException;
    
    /* AYARLAR BAŞLANGIÇ */
    $config = [
        'client_id' => '',
        'client_secret' => '',
        'access_token' => ''
    ];
    
    $file_name = __DIR__."/1.mp4";
    $title = 'Video Title';
    $description = 'Video Description';
    /* AYARLAR BİTİŞ */
    
    $lib = new Vimeo($config['client_id'], $config['client_secret'], $config['access_token']);
    echo 'Uploading: ' . $file_name . "\n";
    
    try {
        // Upload the file and include the video title and description.
        $uri = $lib->upload($file_name, array(
            'name' => $title,
            'description' => $description
        ));
    
        // Get the metadata response from the upload and log out the Vimeo.com url
        $video_data = $lib->request($uri . '?fields=link');
        echo '"' . $file_name . ' has been uploaded to ' . $video_data['body']['link'] . "\n";
    
        // Make an API call to edit the title and description of the video.
        $lib->request($uri, array(
            'name' => $title,
            'description' => $description,
        ), 'PATCH');
    
        echo 'The title and description for ' . $uri . ' has been edited.' . "\n";
    
        // Make an API call to see if the video is finished transcoding.
        $video_data = $lib->request($uri . '?fields=transcode.status');
        echo 'The transcode status for ' . $uri . ' is: ' . $video_data['body']['transcode']['status'] . "\n";
    } catch (VimeoUploadException $e) {
        // We may have had an error. We can't resolve it here necessarily, so report it to the user.
        echo 'Error uploading ' . $file_name . "\n";
        echo 'Server reported: ' . $e->getMessage() . "\n";
    } catch (VimeoRequestException $e) {
        echo 'There was an error making the request.' . "\n";
        echo 'Server reported: ' . $e->getMessage() . "\n";
    }
    ?>
  • 08-03-2022, 16:00:27
    #5
    Merhaba,

    Vimeo github projesindeki kütüphaneyi (https://tus.io/) eklemediğim için çalışmıyormuş. Sorunu cözdüğüm için bildirmek istedim başkası karşılaşırsa dikkat etsinler.