rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: mysoogal on July 06, 2009, 03:42:48 AM

Title: HFS Bittorrent support is here
Post by: mysoogal on July 06, 2009, 03:42:48 AM
after my long awaited news from bt inc  ;D they released the API , and the BT client so now you can let your users share their bandwidh so they don't over kill your monthly bandwidth, this is good if you have large amount of files to serve to users, with this i think its really unlimited usage as long as your internet provider doesnt have cap on monthly bandwidth  ;D could be giving out maybe TB of bandwidth between 1000 users downloading 700 mb videos all the time  ;)

what you can do with this

P2P streaming, you can use hfs to host the direct files and stream through any player wmv, flv player, vlc etc

you can enable your hfs to support large amount of users downloading a single file. its really a great thing right now im trying to integrate this with my vlc theme, i will later convert it into flash video support just in case it gets interesting and want million users visiting my hfs server  ;D

http://www.bittorrent.com/dna/guides/dna-integration-guide/getting-started-what-is-dna
Title: Re: HFS Bittorrent support is here
Post by: rejetto on July 06, 2009, 04:14:58 PM
let us know :)
Title: Re: HFS Bittorrent support is here
Post by: mysoogal on July 06, 2009, 05:26:27 PM
let us know :)

no problem i will  ;)
Title: Re: HFS Bittorrent support is here
Post by: mysoogal on July 11, 2009, 05:22:02 AM
let us know :)



with help from my IRC #javascript friends it looks like hfs can have bittorrent support for streaming through the flash player and maybe later on for vlc theme ;D later on i will integrate this into the vlc template, and remove the vlc player and replace it with flash player  ;D  so far looking good

 

Quote
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Video Links</title>
<script type="text/javascript" src="http://www.bittorrent.com/wp-content/uploads/swfobject.js"></script>
<script type="text/javascript" src="http://btdna.bittorrent.com/btdna.js"></script>

  <script type="text/javascript">

    function videoLink(elem) {
     
      // Pull the URL from the <a> tag
      var videoURL = elem.href;
     
      // Do what the tutorial does, create a new Flash Player
      // with the video, and put it into the "flashcontent" div
      // NOTE: see in addVariable where it calls btdna using the "videoURL"


      var so = new SWFObject("http://www.bittorrent.com/wp-content/uploads/demobuild.swf", "VideoPlayer", "640px", "360px", "9", "#ffffff", true);
      so.addParam("allowFullScreen", "true");
      so.addVariable("auto_play", "true");
      so.addVariable("flvURL",encodeURIComponent(btdna({url:videoURL, service:"streaming", duration:299, buffer_secs:15})));
      so.useExpressInstall('expressinstall.swf');
      so.write("flashcontent");
     
    }
  </script>
 
</head>
 <div id="flashcontent">Video Player Will Go Here</div>
<body>

  <h1>Video Links</h1>

  <a href="http://scottusa.com/flashes/flv/PLASMA.flv" onclick="videoLink(this); return false;"Link 1</a>

  <a href="http://cache01-videos02.myspacecdn.com/149/vid_625227d4fdaf440fa983758df5e6a780.flv" onclick="videoLink(this); return false;">Link 2</a> 



</body>
</html>


the only issue here is that you will need to download the DNA Client :O i wonder why 'expressinstall.swf' isn't working.

maybe this swf player is old i will have to ask around but so far it will work on hfs, if you have the DNA client installed
Title: Re: HFS Bittorrent support is here
Post by: slasherx on July 11, 2009, 11:32:48 AM
let us know :)



with help from my IRC #javascript friends it looks like hfs can have bittorrent support for streaming through the flash player and maybe later on for vlc theme ;D later on i will integrate this into the vlc template, and remove the vlc player and replace it with flash player  ;D  so far looking good

 

Quote
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Video Links</title>
<script type="text/javascript" src="http://www.bittorrent.com/wp-content/uploads/swfobject.js"></script>
<script type="text/javascript" src="http://btdna.bittorrent.com/btdna.js"></script>

  <script type="text/javascript">

    function videoLink(elem) {
     
      // Pull the URL from the <a> tag
      var videoURL = elem.href;
     
      // Do what the tutorial does, create a new Flash Player
      // with the video, and put it into the "flashcontent" div
      // NOTE: see in addVariable where it calls btdna using the "videoURL"


      var so = new SWFObject("http://www.bittorrent.com/wp-content/uploads/demobuild.swf", "VideoPlayer", "640px", "360px", "9", "#ffffff", true);
      so.addParam("allowFullScreen", "true");
      so.addVariable("auto_play", "true");
      so.addVariable("flvURL",encodeURIComponent(btdna({url:videoURL, service:"streaming", duration:299, buffer_secs:15})));
      so.useExpressInstall('expressinstall.swf');
      so.write("flashcontent");
     
    }
  </script>
 
</head>
 <div id="flashcontent">Video Player Will Go Here</div>
<body>

  <h1>Video Links</h1>

  <a href="http://scottusa.com/flashes/flv/PLASMA.flv" onclick="videoLink(this); return false;"Link 1</a>

  <a href="http://cache01-videos02.myspacecdn.com/149/vid_625227d4fdaf440fa983758df5e6a780.flv" onclick="videoLink(this); return false;">Link 2</a> 



</body>
</html>


the only issue here is that you will need to download the DNA Client :O i wonder why 'expressinstall.swf' isn't working.

maybe this swf player is old i will have to ask around but so far it will work on hfs, if you have the DNA client installed

nice, question

- does everyone who access server need client or just the server needs to have it?
- for this to work everyone would need to have the files downloaded for seeding?
Title: Re: HFS Bittorrent support is here
Post by: mysoogal on July 11, 2009, 04:05:02 PM
the idea behind their bit-torrent DNA javascript is, if there is no DNA client on end users computer it will just stream the files normally from the server. so it will still work, but it will work even better if the end user has it installed. yesterday tried already the integration work, it went good but i messed up the template now try doing everything again :D i will post the tpl and info later on. the only true way in finding if this works is to have lots of users on your hfs with the dna client installed. and see if any uploads have been made to other users. testing this on local or by 1 person is really not easy of knowing if it works, i came to the conclusion that it works, because i saw in the dna client control panel, the evidence when i click play, on the dna control panel you can see that its downloading and showing data movement. it would probably be the same with the upload onces there are users using the dna client and using your website.  :D
Title: Re: HFS Bittorrent support is here
Post by: mysoogal on July 12, 2009, 01:11:18 AM
i have integrated bit-torrent streaming using flash player into one theme post is here

http://www.rejetto.com/forum/index.php?topic=7161.45

 ;D