Hi, Bereusei
Currently i am working in windows server in IIS with sql server 2008 as database....
I checked FLV::echo_ffmpeg_test(); and the results shows
FFMPEG is installed on your server and working properly. Code: 1
Totally I am stuck with uploading and video thumbnail.
My code is=======>
1)Video .php
<?php
class Video extends DataObject
{
static $db = array ('Title' => 'Varchar(100)','Description' => 'Text');
static $has_one = array ('VideoPage1' => 'VideoPage','Video' => 'FLV');
}
2)VideoPage.php
<?php
class VideoPage extends SectionPage {
static $has_many = array ('Videos' => 'Video');
static $has_one = array ('Filepath' => 'Filename');
public static $icon = 'mysite/images/treeicons/video';
public static $db = array(
);
//public static $has_one = array();
public function canCreate($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) $member = Member::currentUser();
if($member && Permission::checkMember($member, "ADMIN")) return true;
// DEPRECATED 2.3: use canCreate() instead
$results = $this->extend('alternateCanCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;
// decorated permission checks
$results = $this->extend('canCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;
return $this->stat('can_create') != false || Director::isDev();
}
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Videos", new FileDataObjectManager(
$this,
'Videos',
'Video',
'Video',
array('Title' => 'Title', 'Description' => 'Description'),
new FieldSet(
new TextField('Title'),
new TextareaField('Description')
)
));
return $fields;
}
function Thumbnail() {
$Image = $this->Image();
if ( $Image ) {
return $Image->CMSThumbnail();
} else {
return null;
}
}
}
class VideoPage_Controller extends SectionPage_Controller {
public static $allowed_actions = array (
);
public function init() {
parent::init();
}
}
3)VideoPage.ss
<% if IncludeLeftPanel %>
<% include LeftPanel %>
<% end_if %>
<div id="Content" class="typography <% if IncludeLeftPanel %>wLeft<% end_if %><% if IncludeRightPanel %>wRight<% end_if %>">
<% if ClassName=="HomePage" %>
<% control sectionPages %>
<% if Children %>
<div class="$URLSegment contentBox sectionSummary round shadow">
<a href="$Link"><img class="icon" alt="$Title Icon" src='$icon.URL'/></a>
<div class="description">
<a href="$Link"><h3>$Tagline</h3></a>
<p>$Blurb</p>
<a href="$Link"><img class="headshot" alt="$Title Headshot" src='$headshot.URL'/></a>
</div>
</div>
<% end_if %>
<% end_control %>
<% end_if %>
<% if ComingSoon %>
<% include ComingSoon %>
<% else_if Content %>
<% if NoContentBox %>
$Content
<% else %>
<div id="ContentInner" class="round shadow">
<link rel="stylesheet" type="text/css" href="Player/style.css">
<center>
<!--<div id="mediaplayer">H2connect Video Player </div>-->
<video id="mediaplayer"></video>
</center>
<div align="center">
<script type="text/javascript" src="Player/jwplayer.js"></script>
</div>
<!--$Content-->
<ul>
<% control Videos %>
<li style="display:inline-block; *float:left;text-align:center;">
Title:<h3>$Title</h3>
<div style="margin: 3px auto; width:70px;text-align:center;padding:10px; border:0px solid #f7f7f7;">
</div>
<% control Video %>
<div id="mediaplayer"></div>
<script type="text/javascript">
jwplayer('mediaplayer').setup({
flashplayer: '/Player/player.swf',
file: '$FLVLink',
image: '$image'
});
</script>
<script type="text/javascript">
function Play(videoUrl)
{
var playlist = jwplayer('mediaplayer').getPlaylist();
var newItem = videoUrl;
playlist.push(newItem);
jwplayer('mediaplayer').load(newItem);
}
</script>
<div>
<a href="#" onclick="Play('$FLVLink')">
Thumbnail
</a>
</div>
<% end_control %>
Description:<h3>$Description</h3>
</li>
<% end_control %>
</ul>
<% if ClassName=="Page" %>
<div>$Form</div>
<% else_if Fields %>
<div>$Form</div>
<% end_if %>
<% if ClassName == RegistrationPage %>
<% if RegistrationForm %>
<% control RegistrationForm %><% include MultiFormProgressList %><% end_control %>
<div>$RegistrationForm</div>
<% end_if %>
<% end_if %>
<div>$PageComments</div>
</div>
<% end_if %>
<% end_if %>
</div>
<% if IncludeRightPanel %>
<% include RightPanel %>
<% end_if %>
<% if IncludeOurPicks %>
<% include OurPicks %>
<% end_if %>
Here i am used uploadify for uploading files.
Pls find me a solution....
Regards
Arun