video conversion in progress

Discuss of clipshare script, custom programming, templates or anything related to this video script

video conversion in progress

Postby dargre » Fri Sep 09, 2011 7:47 pm

If you have "Video Approve" option to 'yes', once video uploded it will appear on your website represented by "Video in progress.." thumb.
Now when you click such thumb - you go to view video page, but video will fail to play of course.
I think this is good idea to check first if video is available to play and if it is not (eg. still converting), display appropriate info instead of broke player.

To do this, first edit file "view_video.php" and search for the line:
Code: Select all
$VID        = $video['0']['VID'];

Below in new line you can check if video exists.
Code: Select all
$exists='0';
if( $video['0']['embed_code']=='' && !file_exists($config['FLVDO_DIR'].'/'.$VID.'.flv')) {
   $exists=1;
}
STemplate::assign('exists', $exists);

Now in template file (view_video.tpl) you can display a player or info depending what is check result.
You should have code like this:
Code: Select all
   {if $vinfo[0].embed_code eq ''}
        {include file="view_video_player_vplayer.tpl"}
   {else}

or using Nuevoplayer:
Code: Select all
   {if $vinfo[0].embed_code eq '' || $isyoutube eq '1'}
        {include file="view_video_nuevoplayer.tpl"}
   {else}


You can replace it with this code:
Code: Select all
   {if $vinfo[0].embed_code eq ''}
        {if $exists eq '1'}
           <br /><br /><center>
          <b>Conversion in progress or video file not found!</b>
          </center><br /><br />
       {else}
           {include file="view_video_player_vplayer.tpl"}
   {/if}
        {else}

or if this is Nuevoplayer the code can be like this:
Code: Select all
   {if $vinfo[0].embed_code eq '' || $isyoutube eq '1'}
        {if $exists eq '1'  && $vinfo[0].embed_code eq ''}
           <br /><br /><center>
           <b>Conversion in progress or video file not found!</b>
           </center><br /><br />
       {else}
           {include file="view_video_nuevoplayer.tpl"}
   {/if}
        {else}


I think it's good idea to let people know that video is in progress than showing broken player...
Thanks.
Thank you,
Nuevolab Team
dargre
 
Posts: 332
Joined: Mon Sep 07, 2009 3:47 am

Return to Clipshare

Who is online

Users browsing this forum: No registered users and 0 guests