Difference between revisions of "Pseudo Streaming"
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{CARMA1 Manual | ||
+ | | show_extras_section = true | ||
+ | }} | ||
+ | |||
== Using Pseudo Streaming == | == Using Pseudo Streaming == | ||
− | + | ||
− | You | + | As of version 1.4.0.1, [[CARMA]] contains a feature that enables pseudo streaming for your [[Ct#Member|members]]. Pseudo streaming allows [[Ct#Member|members]] and [[Ct#Surfer|surfers]] to seek in videos that have not been fully downloaded. |
+ | |||
+ | If you are looking to pseudo stream MP4 videos, please use look at the [[Using mp4 Videos]] article. | ||
+ | |||
+ | === Getting the Players === | ||
+ | |||
+ | [[CARMA]] supports both JW Player and Flow Player for playback of flash movies. Use the following instructions if you wish to install either of these players. | ||
+ | |||
+ | '''JW PLAYER'''<br> | ||
+ | |||
+ | You can download JW Player from its website at http://www.longtailvideo.com/players/jw-flv-player/. After you have downloaded the file, unzip its contents and upload the following files to [[CARMA]]'s ''site_script'' directory in ''carma/site_scripts''. | ||
+ | |||
+ | * player.sqf | ||
+ | * swfobject.js | ||
+ | |||
+ | If your member [[Ct#Site|site]] has been set up with symbolic links (symlinks) to the individual files in the ''site_scripts'' directory instead of the folder, you will also need to set up a symbolic link for the files you are uploading. | ||
+ | |||
+ | '''FLOW PLAYER'''<br> | ||
+ | |||
+ | You can download Flow Player from its website at http://flowplayer.org/. After downloading Flow Player, you will also need to download the plugin that enables pseudo streaming. You can find this plugin on their website under their plugins tab. | ||
+ | |||
+ | === Required Code === | ||
+ | |||
+ | You can use any of the following code if you wish to implement pseudo streaming on your [[Ct#Site|site(s)]]: | ||
'''JW Player:''' | '''JW Player:''' | ||
Line 53: | Line 80: | ||
</pre> | </pre> | ||
− | === | + | === Additional Setup Notes === |
− | + | * Make sure you add the following line to your config file (found in carma/includes/config.php): | |
− | + | ** ''$config['ALLOW_FLV_STREAM'] = 1;'' | |
− | * | ||
− | * | ||
− | + | *The code given above should in the [[#Required Code|Required Code]] section should be used in the "view_clip" [[Ct#Template|template]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | *The code given above should be used in the view_clip template | ||
− | |||
− | {if $smarty.request.debug==1}{debug}{/if} | + | * You can check the variables available to you on each page by putting a statement that resembles the following example: |
+ | ** ''{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. This will create a popup with all of the available variables found on the specified page. | ||
− | + | * For more information on Flash Players, please see our wiki article: http://wiki.toomuchmedia.com/index.php/Flash_Player |
Latest revision as of 10:36, 29 May 2013
Using Pseudo Streaming
As of version 1.4.0.1, CARMA contains a feature that enables pseudo streaming for your members. Pseudo streaming allows members and surfers to seek in videos that have not been fully downloaded.
If you are looking to pseudo stream MP4 videos, please use look at the Using mp4 Videos article.
Getting the Players
CARMA supports both JW Player and Flow Player for playback of flash movies. Use the following instructions if you wish to install either of these players.
JW PLAYER
You can download JW Player from its website at http://www.longtailvideo.com/players/jw-flv-player/. After you have downloaded the file, unzip its contents and upload the following files to CARMA's site_script directory in carma/site_scripts.
- player.sqf
- swfobject.js
If your member site has been set up with symbolic links (symlinks) to the individual files in the site_scripts directory instead of the folder, you will also need to set up a symbolic link for the files you are uploading.
FLOW PLAYER
You can download Flow Player from its website at http://flowplayer.org/. After downloading Flow Player, you will also need to download the plugin that enables pseudo streaming. You can find this plugin on their website under their plugins tab.
Required Code
You can use any of the following code if you wish to implement pseudo streaming on your site(s):
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}
Additional Setup Notes
- Make sure you add the following line to your config file (found in carma/includes/config.php):
- $config['ALLOW_FLV_STREAM'] = 1;
- The code given above should in the Required Code section should be used in the "view_clip" template.
- You can check the variables available to you on each page by putting a statement that resembles the following example:
- {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. This will create a popup with all of the available variables found on the specified page.
- For more information on Flash Players, please see our wiki article: http://wiki.toomuchmedia.com/index.php/Flash_Player