public function testUploadVideo()
 {
     $guid = Vzaar::uploadVideo(self::$filePath);
     $videoId = Vzaar::processVideo($guid, "for deletion", "php test", "");
     $json = json_decode(Vzaar::deleteVideo($videoId));
     $this->assertEquals($json->video_status_id, 9);
 }
 public function testUploadVideo()
 {
     $title = "api-php-" . generateRandomStr(5);
     $guid = Vzaar::uploadVideo(self::$filePath);
     $videoId = Vzaar::processVideo($guid, $title, "php test", "");
     $vid = Vzaar::getVideoDetails($videoId, true);
     $this->assertEquals($vid->videoStatusDescription, "Preparing");
     // clean up
     Vzaar::deleteVideo($videoId);
 }
예제 #3
0
<?php

require_once '../../src/Vzaar.php';
Vzaar::$token = "u2nd3DVI71jQ7dTtz9mHA953XeIQeodmZvSE6AbTX8s34";
Vzaar::$secret = "skitsanos";
header('Content-type: text/html');
if (isset($_POST['guid'])) {
    $apireply = Vzaar::processVideo($_POST['guid'], $_POST['title'], $_POST['description'], 's3_upload', Profile::Original);
    echo $apireply;
} else {
    echo 'GUID is missing';
}
예제 #4
0
<?php

/*
 * @author Skitsanos
*/
require_once '../src/Vzaar.php';
Vzaar::$token = 'token';
//
Vzaar::$secret = 'secret';
$filename = '548.mov';
// the file must be located in the same directory as the script. If not use full disk path
$file = getcwd() . '\\' . $filename;
echo 'file to upload: ' . $file;
//$result=Vzaar::uploadVideo($file);
$result = Vzaar::processVideo('guid', 'testing special characters like & so on', '', '', Profile::HighDefinition);
echo $result;
<?php

/*
 * @author Skitsanos
 */
require_once '../src/Vzaar.php';
Vzaar::$token = 'token';
//
Vzaar::$secret = 'secret';
$guid = '';
if (isset($_GET['guid'])) {
    $guid = $_GET['guid'];
}
if (isset($_POST['guid'])) {
    $apireply = Vzaar::processVideo($_POST['guid'], $_POST['title'], $_POST['description'], 1);
}
?>
<!DOCTYPE html>
<html>
    <head>
	<title>Process video</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="author" content="Skitsanos.com"/>
    </head>

    <body>
<?php 
print_r('Returned Video ID: ' . $apireply);
?>
	<form action="uploadvideoprocess.php" method="post">
	    <table cellspacing='0' cellpadding='0' border='0'>
예제 #6
0
<?php

require_once '../../src/Vzaar.php';
Vzaar::$token = "GETUGkPFNC84JlzXkOMSYQFTOCAixOIiroh7oUj3k";
Vzaar::$secret = "skitsanos";
$guid = Vzaar::uploadVideo('D:\\Sites\\Vzaar\\Vzaar API\\api\\php\\trunk\\tests\\video.flv');
echo 'guid: ' . $guid . ' --- video id: ';
$apireply = Vzaar::processVideo($guid, 'SimpleUpload test', '', 1);
echo $apireply;
<?php

// common.php houses common setup and environment setup
require "common.php";
if (isset($_POST['guid'])) {
    $response = Vzaar::processVideo($_POST['guid'], $_POST['title'], $_POST['description'], "", 5, true, '', $_POST['chunks']);
    echo json_encode($response);
}