Difference between revisions of "Pseudo Streaming"

From TMM Wiki
Jump to navigationJump to search
Line 1: Line 1:
 +
{{CARMA1 Manual
 +
| show_template_functions_section = true
 +
}}
 +
 
== Using Pseudo Streaming ==
 
== Using Pseudo Streaming ==
 
In Carma versions 1.4 and after, there is a feature that enables pseudo streaming.
 
In Carma versions 1.4 and after, there is a feature that enables pseudo streaming.

Revision as of 12:03, 8 June 2010

CARMA
  Template Functions
CARMA Template Functions
carma_actor_photo_name
carma_comments_display
carma_comments_form
carma_count
carma_favorite
carma_gal_custom
carma_get_extended
carma_list
carma_list_favorites
carma_list_gals
carma_list_third_party_content
carma_list_videos
carma_login_log
carma_most_viewed
carma_newest
carma_news
carma_poll
carma_retrieve_sections
carma_search
carma_actors_search
carma_show_gal
carma_show_video
carma_top_actors
carma_top_rated
carma_upcoming
print_page_numbers
Template Function Aliases
carma_comment_display
carma_display_comment
carma_display_comments
carma_extended
carma_extended_data
carma_get_extended_data
carma_list_all
Common Parameters
assign
assign_prefix
count
data_only
display_on_assign
start
tpl

Using Pseudo Streaming

In Carma versions 1.4 and after, there is a feature that enables pseudo streaming. You should be able use any of the following code to implement this feature:

JW Player:

<script type='text/javascript' src='swfobject.js'></script>
<div id='video_holder'>This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player-viral.swf','mpl','700','400','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addVariable('file', 'view_clip.php/{$smarty.request.galid}/{$smarty.request.type}/{$smarty.request.num}/video.flv');
so.addVariable('provider','http');
so.write('video_holder');
</script>


Flow Player:

<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='jquery.tools.js'></script>



<div class="video_holder" style="display:block;width:750px;height:460px"> 
</div> 
{literal}

<script>
flowplayer("div.video_holder", 'flowplayer.swf', {
clip: {
autoPlay: false,
autoBuffering: false,
loop: false,
scaling: 'fit',
url: {/literal}'view_clip.php/{$smarty.request.galid}/{$smarty.request.type}/{$smarty.request.num}/video.flv'{literal} ,
provider: 'CARMA'
},
plugins: { 
CARMA: {
url: 'flowplayer.pseudostreaming.swf' 
}
}
} 
);
</script>

{/literal}


Getting the Players

JW PLAYER
You can get the JW Player from http://www.longtailvideo.com/players/jw-flv-player/. Once you've download file, unzip its contents and upload the following files to the site_script directory in carma/site_scripts.

  • player.sqf
  • swfobject.js

If you have your member site set up with symbolic links to the individual files in site_scripts, instead of the folder, the you will also need to set up a symbolic link for these files as well.

FLOW PLAYER
You can get the Flow Player from http://flowplayer.org/. In additon to the actual player, you will also need the plugin for pseudo streaming which can be found under their plugins tab.

Additional Setup Notes

  • Make sure you add the following to your config file (carma/includes/config.php):

$config['ALLOW_FLV_STREAM'] = 1;
This is the new default in version (1.4.1), but if you are on an earlier version you will need to set this.

  • The code given above should be used in the view_clip template
  • You can check the variables available to you on each page by putting a statement resembling the following:

{if $smarty.request.debug==1}{debug}{/if}

Then, when you view the page in question, add debug=1 to the URL as a query variable and it will create a popup with all of the available variables for the page.