PageSourceSearch

https://swarmcloud.net/assets/js/330032c3.6d3b7189.js

js swarmcloud.net collected 2026-09-25 22:08:01 UTC 7,623 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkswarmcloud_docs=self.webpackChunkswarmcloud_docs||[]).push([[6308],{3757:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>y,frontMatter:()=>l,metadata:()=>p,toc:()=>u});r(6540);var n=r(5680);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const l={title:"Introduction",sidebar_position:1},c=void 0,p={unversionedId:"introduction",id:"introduction",title:"Introduction",description:"Features",source:"@site/docs/download/introduction.mdx",sourceDirName:".",slug:"/introduction",permalink:"/download/introduction",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Introduction",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Usage",permalink:"/download/"}},s={},u=[{value:"Features",id:"features",level:3},{value:"Browser Support",id:"browser-support",level:3},{value:"Application Scenarios",id:"application-scenarios",level:3},{value:"Online Demo",id:"online-demo",level:3}],g={toc:u},d="wrapper";function y(e){var{components:t}=e,r=i(e,["components"]);return(0,n.yg)(d,o(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){a(e,t,r[t])})}return e}({},g,r),{components:t,mdxType:"MDXLayout"}),(0,n.yg)("a",{href:"https://www.npmjs.com/package/@swarmcloud/file"},(0,n.yg)("img",{src:"https://img.shields.io/npm/v/@swarmcloud/file.svg?style=flat",alt:"npm"})),(0,n.yg)("a",{href:"https://www.jsdelivr.com/package/npm/@swarmcloud/file"},(0,n.yg)("img",{src:"https://data.jsdelivr.com/v1/package/npm/@swarmcloud/file/badge",alt:"jsdelivr"})),(0,n.yg)("h3",{id:"features"},"Features"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"Lightweight, plugin-free peer-to-peer communication via WebRTC data channels"),(0,n.yg)("li",{parentName:"ul"},"Supports downloading any type of file"),(0,n.yg)("li",{parentName:"ul"},"Supports downloading multiple files simultaneously"),(0,n.yg)("li",{parentName:"ul"},"Instructs the browser to save files using response headers and a service worker"),(0,n.yg)("li",{parentName:"ul"},"Efficient scheduling policies that enhance P2P streaming performance"),(0,n.yg)("li",{parentName:"ul"},"Uses an IP database to group peers by ISP and region")),(0,n.yg)("h3",{id:"browser-support"},"Browser Support"),(0,n.yg)("p",null,"WebRTC is already part of the HTML5 standard and is broadly supported in modern browsers. CDNBye's compatibility depends on the browser's support for WebRTC."),(0,n.yg)("table",null,(0,n.yg)("thead",{parentName:"table"},(0,n.yg)("tr",{parentName:"thead"},(0,n.yg)("th",{parentName:"tr",align:"center"},"Compatibility"),(0,n.yg)("th",{parentName:"tr",align:"center"},"Chrome"),(0,n.yg)("th",{parentName:"tr",align:"center"},"Firefox"),(0,n.yg)("th",{parentName:"tr",align:"center"},"macOS Safari"),(0,n.yg)("th",{parentName:"tr",align:"center"},"Android Wechat/QQ"),(0,n.yg)("th",{parentName:"tr",align:"center"},"Opera"),(0,n.yg)("th",{parentName:"tr",align:"center"},"Edge"),(0,n.yg)("th",{parentName:"tr",align:"center"},"iOS Safari"),(0,n.yg)("th",{parentName:"tr",align:"center"},"IE"))),(0,n.yg)("tbody",{parentName:"table"},(0,n.yg)("tr",{parentName:"tbody"},(0,n.yg)("td",{parentName:"tr",align:"center"},"WebRTC Datachannel"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u2714"),(0,n.yg)("td",{parentName:"tr",align:"center"},"\u274c")))),(0,n.yg)("h3",{id:"application-scenarios"},"Application Scenarios"),(0,n.yg)("p",null,"Designed for large file downloads, such as installation packages and media files."),(0,n.yg)("br",null),"Unlike a normal web download (such as an ***a*** tag), this approach requires the download page to stay open. We recommend adding a reminder to prevent users from closing the page. :::note This plugin is not suitable for downloading files smaller than 10MB",(0,n.yg)("br",null),"Not suitable for loading JS, CSS, HTML, or image files :::",(0,n.yg)("h3",{id:"online-demo"},"Online Demo"),(0,n.yg)("p",null,(0,n.yg)("a",{parentName:"p",href:"https://cdnbye.github.io/file-p2p-engine/demo/save-by-stream.html"},"View demo")))}y.isMDXComponent=!0},5680:(e,t,r)=>{r.d(t,{xA:()=>s,yg:()=>y});var n=r(6540);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?o(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef(function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(r),d=a,y=u["".concat(c,".").concat(d)]||u[d]||g[d]||o;return r?n.createElement(y,i(i({ref:t},s),{},{components:r})):n.createElement(y,i({ref:t},s))});function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var p=2;p<o;p++)i[p]=r[p];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.