Created
May 30, 2012 16:05
-
-
Save phpfunk/2837276 to your computer and use it in GitHub Desktop.
Disable Seeking - Viddler API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
include '/path/to/viddler/api/'; | |
$v = new Viddler_V2('YOUR API KEY'); | |
$auth = $v->viddler_users_auth(array( | |
'user' => 'YOUR USERNAME', | |
'password' => 'YOUR PASSWORD' | |
)); | |
if (! isset($auth['auth']['sessionid'])) { | |
//Handle auth error | |
} | |
//Disable seeking (If embed code is flash) | |
$embed = $v->viddler_videos_getEmbedCode(array( | |
'sessionid' => $auth['auth']['sessionid'], | |
'video_id' => 'VIDEO_ID', | |
'embed_code_type' => 5, | |
'disableseek' => '1' | |
)); | |
//Disable forward seeking (If embed code is flash) | |
$embed = $v->viddler_videos_getEmbedCode(array( | |
'sessionid' => $auth['auth']['sessionid'], | |
'video_id' => 'VIDEO_ID', | |
'embed_code_type' => 5, | |
'disableforwardseek' => '1' | |
)); | |
//Disable backwards seeking (If embed code is flash) | |
$embed = $v->viddler_videos_getEmbedCode(array( | |
'sessionid' => $auth['auth']['sessionid'], | |
'video_id' => 'VIDEO_ID', | |
'embed_code_type' => 5, | |
'disablebackwardseek' => '1' | |
)); | |
echo (isset($embed['video']['embed_code'])) ? $embed['video']['embed_code'] : 'No embed code found'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment