├── BWsaver_install.md ├── CORS.md ├── README.md ├── errors.md ├── hls.md ├── hooks.md ├── install.md ├── progressive_download.md ├── resources ├── Rule_1.png ├── Rule_2.png ├── canceled_error_1.png ├── canceled_error_2.png ├── clear_local_cache.png ├── cors_howto.png ├── debug_timeline.png ├── get_stats.png ├── recent_events.png └── video_sources.png ├── stats_install.md └── troubleshooting.md /BWsaver_install.md: -------------------------------------------------------------------------------- 1 | # HolaCDN bandwidth saver 2 | 3 | Hola bandwidth saver reduces bandwidth consumption of progressive MP4/FLV/WebM downloads 30-40%, by controlling the player buffer and only downloading the required parts of the video from the server. 4 | 5 | If you use the bandwidth saver, you will also enjoy the [free Hola video analytics][1], which provide you with detailded statistics regarding what really matters - your end user's experience 6 | 7 | Implementation should take only a few minutes. Follow the [step by step guide][2] 8 | 9 | If you have any questions during implementation, please email cdn-help@hola.org, or skype:holacdn.com 10 | 11 | [1]: /stats_install.md 12 | [2]: /install.md 13 | -------------------------------------------------------------------------------- /CORS.md: -------------------------------------------------------------------------------- 1 | # Server side configuration for video download 2 | 3 | Instructions for configuring and verifying CORS settings for different web servers are below. 4 | 5 | The HolaCDN FAQ includes a [section dedicated to CORS] (http://holacdn.com/faq#imp-cors). If you have additional questions, email cdn-help@hola.org, or skype:holacdn 6 | 7 | ### CORS test method #1: using develeopr console commands 8 | First enable hola_debug. Either by adding url param `?hola_debug=true` when accessing the page, or type in console `hola_cdn.debug_mode()`. 9 | 10 | Now enter in console: 11 | ``` 12 | hola_cdn.test_cors() 13 | ``` 14 | 15 | The current status of CORS settings will be displayed. 16 | 17 | ### CORS test method #2: using HolaCDN Control Panel 'Integration' tool 18 | The HolaCDN Control Panel features an easy way to check your HolaCDN deployment, including CORS status. Simply go to the [Integration tool] (http://holacdn.com/cp/tools/integration), enter the URL of page that contains the video, select 'CDN mode' from the drop down box and start the test. 19 | 20 | The current status of CORS settings will be displayed in the test results. You can click on the summary to see detailed test results. 21 | 22 | ### Interpreting the CORS test results 23 | 24 | If you see ```CORS status: full support```, your CORS settings are correct. 25 | 26 | Otherwise, continue following this guide to configure and verify your settings using one of the following guides: 27 | - [CORS setup for most web servers](#configMostServers) 28 | - [CORS setup for Amazon AWS S3](#configAWS) 29 | - [CORS setup for MaxCDN](#configMaxCDN) 30 | - [CORS setup for Fastly](#configFastly) 31 | - [CORS setup for LeaseWeb](#configLeaseweb) 32 | - [CORS setup for Wowza](#configWowza) 33 | 34 | ### CORS configuration for most web servers 35 | 36 | For step by step instructions regarding how to enable CORS on different web servers, see the [[original CORS documentation](http://enable-cors.org/server.html)] (http://enable-cors.org/server.html). Make sure you add all the required headers (**header fields are comma separated**), not just '*' referenced in the generic instructions: 37 | 38 | - Access-Control-Allow-Origin: * 39 | - Access-Control-Allow-Methods: HEAD, GET, OPTIONS 40 | - Access-Control-Expose-Headers: Content-Range, Date, Etag, Cache-Control, Last-Modified 41 | - Access-Control-Allow-Headers: Content-Type, Origin, Accept, Range, Cache-Control 42 | - Access-Control-Max-Age: 600 43 | - Timing-Allow-Origin: * 44 | 45 | It is also recommended to add Cache-Control header with max-age directive, otherwise the default of 600 seconds will be used: 46 | 47 | - Cache-Control: max-age=86400 48 | 49 | After committing the configuration changes, [verify it works](https://docs.google.com/document/d/1aLFKeQIbs3EnSMXKjXQrseVf_XkeOlDNMDYbxnbH2N8/edit?usp=sharing) 50 | 51 | **Finished with CORS configuration? You can [go back to enabling HolaCDN] (https://github.com/spark-mv/cdn/blob/master/install.md#4-allow-holacdn-to-download-content)** 52 | 53 | ### CORS configuration for Apache 54 | To add the CORS authorization to the header using Apache, simply add the following line inside either the ``, ``, `` or `` sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file: 55 | 56 | ``` 57 | Header set Access-Control-Allow-Origin "*" 58 | Header set Access-Control-Allow-Methods "HEAD, GET, OPTIONS" 59 | Header set Access-Control-Expose-Headers "Content-Range, Date, Etag, Cache-Control, Last-Modified" 60 | Header set Access-Control-Allow-Headers "Content-Type, Origin, Accept, Range, Cache-Control" 61 | Header set Access-Control-Max-Age "600" 62 | Header set Timing-Allow-Origin "*" 63 | ``` 64 | 65 | After this passes, you may need to reload Apache to make sure your changes are applied by running the command 66 | 67 | `sudo service apache2 reload` 68 | 69 | Altering headers requires the use of mod_headers. Mod_headers is enabled by default in Apache, however, you may want to ensure it's enabled by run 70 | 71 | `a2enmod headers` 72 | 73 | ### CORS configuration for Nginx 74 | A sample conf statements is given below. Note that they have to be in the same nested level 75 | ``` 76 | add_header 'Access-Control-Allow-Origin' '*'; 77 | add_header 'Access-Control-Allow-Methods' 'HEAD, POST, GET, OPTIONS'; 78 | add_header 'Access-Control-Expose-Headers' 'Content-Range, Date, Etag, Cache-Control, Last-Modified'; 79 | add_header 'Access-Control-Allow-Headers' 'Content-Type, Origin, Accept, Range, Cache-Control'; 80 | add_header 'Access-Control-Max-Age' '600'; 81 | add_header 'Timing-Allow-Origin' '*'; 82 | add_header 'Cache-Control' 'max-age=86400'; 83 | if ($request_method = 'OPTIONS') { 84 | return 204; 85 | } 86 | ``` 87 | 88 | ### CORS configuration for Amazon AWS 89 | 90 | Please refer to [these instructions](https://docs.google.com/document/d/1RrWA7gfCLDXcjgCQOQRGs0A3IRSlvn3Ktu9zHp9j-po/edit?usp=sharing) for a step-by-step guide on how to configure and verify CORS for Amazon AWS S3. 91 | 92 | For Amazon's official document on setting CORS on S3, see [here](http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html). 93 | 94 | If you're using CloudFront, please refer to [Amazon's documentation](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-cors) for to how to configure CloudFront to respect cross-origin resource sharing (CORS). 95 | 96 | ### CORS configuration for MaxCDN 97 | 98 | Please refer to [these instructions] (https://docs.google.com/document/d/12wQr79BXaTJ4WF9_-oueEW9Cx0FMvsNOCcMBifzfzIE/edit?usp=sharing) for a step-by-step guide on how to setup CORS on MaxCDN. 99 | 100 | ### CORS configuration for Fastly 101 | 102 | Please refer to [these instructions] (https://docs.google.com/document/d/1zIMMQe4lSy7ubcWv9FDxzsWw6acjv9_o6yZrhgoyit0/edit?usp=sharing) for a step-by-step guide on how to setup CORS on Fastly. 103 | 104 | ### CORS configuration for LeaseWeb 105 | 106 | Please refer to [these instructions] (https://docs.google.com/document/d/16jw0ORZr7i1ZfumzVcnGF1mua8J48IuVPCNm_7jhoAE/edit?usp=sharing) for a step-by-step guide on how to setup CORS on LeaseWeb. 107 | 108 | ### CORS configuration for Wowza 109 | 110 | Please refer to [these instructions] (https://www.wowza.com/docs/how-to-enable-cross-origin-resource-sharing-cors-for-http-based-streams) for a step-by-step guide on how to setup CORS on Wowza. 111 | 112 | **Finished with CORS configuration? You can [go back to enabling HolaCDN] (https://github.com/spark-mv/cdn/blob/master/install.md#4-allow-holacdn-to-download-content)** 113 | 114 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [HolaCDN: Speeding up Video Delivery] (https://github.com/spark-mv/cdn/blob/master/install.md) 2 | 3 | 1. [**Sign up**] (https://holacdn.com/cp) to HolaCDN. Get instant access to your video delivery portal. 4 | 2. Add the JavaScript to your site. Use the portal to see your user's QoE (start/seek times, % buffering, bitrate, etc.). 5 | 3. Enable HolaCDN to improve user QOE and save costs. Use the portal to control the deployment and see the benefits. 6 | 7 | ## [Detailed video analytics (FREE)] (https://github.com/spark-mv/cdn/blob/master/stats_install.md) 8 | 9 | * Do you know what is the video start time for your users in London? 10 | * Is there video buffering for Indian users during peak times? 11 | * What percentage of your users click play, but never see a video and move on to another site? 12 | 13 | No matter what kind of video, origin or CDN(s) you use - HolaCDN can provide answers. 14 | 15 | Implementation is simple: simply add a JavaScript to your site. [Start now] (https://github.com/spark-mv/cdn/blob/master/stats_install.md), and access realtime statistics on the portal. 16 | 17 | To see a live account, login to the [demo account] (http://bit.ly/HolaCDNPortalDemo) (user: portal_demo@hola.org, password: holacdn) 18 | 19 | **_HolaCDN video analytics are completely free for both non-commercial and commercial use._** 20 | 21 | ##[Hola video CDN] (https://github.com/spark-mv/cdn/blob/master/install.md) 22 | 23 | Hola also offers a commercial CDN service, specifically designed for video delivery. 24 | 25 | Hola client side code “auctions” each chunk of the video between the existing CDN and multiple Hola CDN servers worldwide. First chunks are downloaded from the fastest servers and later chunks are downloaded from the lowest cost servers. 26 | 27 | Your video is played using chunks downloaded from multiple CDN servers, at high speed & reliability, with minimal cost. For more details, visit [HolaCDN website] (http://www.holacdn.com). 28 | 29 | ## [Does your site use progressive video? Reduce your CDN costs even more with the bandwidth saver ](https://github.com/spark-mv/cdn/blob/master/BWsaver_install.md) 30 | 31 | Progressive MP4/FLV is an easy way to deliver online video, but also wastes bandwidth. Simply put, video downloads in full, but most users don't view all the downloaded bytes. And you end up paying for the wasted bandwidth. 32 | 33 | HolaCDN bandwidth saver will instantly reduce HolaCDN's effective cost by 30-40%. Simply add the JavaScript to your video pages. The bandwidth saver is automatically activated as part of HolaCDN. To implement HolaCDN, Follow the step-by-step instructions in [the guide] (https://github.com/spark-mv/cdn/blob/master/BWsaver_install.md). 34 | -------------------------------------------------------------------------------- /errors.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This section contains error messages, what they mean and how you can fix them. 4 | 5 | If you have any questions, email cdn-help@hola.org, or skype:holacdn 6 | 7 | ## Hola skip 8 | 9 | ## no_browser_match 10 | 11 | 12 | -------------------------------------------------------------------------------- /hls.md: -------------------------------------------------------------------------------- 1 | # HLS/ HDS 2 | 3 | **_This module is completly free for both non-commercial and commercial use._** 4 | 5 | ## Hola CDN solution includes 6 | * Free video analytics tool for your web-site 7 | * Free [Hola player] (https://github.com/hola/player) (optional) 8 | 9 | ## Table of contents 10 | * [Test Hola CDN in less than 5 minutes](#TestHola) 11 | * [Integrate free tool for your web-site](#FreeTool) 12 | * [Server side configuration](#ServerConfig) 13 | 14 | ## Test Hola CDN in less than 5 minutes 15 | You can locally test the client side module quickly on your site, from the Chrome browser developer console. 16 | 17 | #### Prerequisites 18 | * Supported players: [Hola player] (https://github.com/hola/player), JWPlayer , VideoJS HTML5 players. 19 | * Supported browsers: Chrome (Win/Mac), IE 10, 11. Firefox support coming soon. 20 | 21 | #### Flow 22 | **Disable security** 23 | * Exit Chrome and make sure no Chrome processes are running. 24 | * Temporarily launch Chrome with command line parameter `--disable-web-security`. For example: 25 | 26 | `"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security`. 27 | 28 | Notes: 29 | * The location of your chrome.exe might be different. 30 | * You can also edit the Chrome shortcut to include the parameter. 31 | * In Mac, launch Chrome from a terminal window. 32 | 33 | **Launch developer console** 34 | * Go to your website's video page and launch the developer console (F12), then click the console tab. 35 | 36 | **Load Hola CDN** 37 | * In console, enter `jQuery.getScript('http://client.h-cdn.com/loader.js')`. 38 | 39 | **Init Hola CDN** 40 | 41 | CDN init command varies according to the video player used: 42 | * For JWplayer 6+, VideoJS or Hola player, use `hola_cdn.init()`. 43 | * For an old version of JWPlayer (V4,V5), use 44 | `hola_cdn.init({autostart: true, jwplayer_version: 'auto'})` 45 | * For Kernel player, use 46 | `hola_cdn.init({video_url: decodeURIComponent(flashvars.video_url), autostart: true})` 47 | 48 | **Play movie** 49 | * Following the init command, the player will reload. Click play to start the video. 50 | 51 | **Demo results** 52 | * You can switch to the 'network' tab and verify that the video chunks are requested from multiple servers, and not from a single IP address. 53 | * You can also use ‘getstats’ in console to see some statistics. 54 | 55 | Note: If you navigate to another video, you may need to reload the JS module. When embedding the script into your page, you will require to do so. 56 | 57 | ## Integrate free tool for your web-site 58 | 59 | #### Static loading of client side module loader.js (preferred) 60 | ```html 61 | 62 | ``` 63 | #### Dynamic loading of client side module loader_demo.js with jQuery 64 | ```js 65 | jQuery.getScript('http://client.h-cdn.com/loader.js?customer=demo') 66 | ``` 67 | followed by 68 | ```js 69 | hola_cdn.init() 70 | ``` 71 | #### Dynamic loading of client side module loader.js without jQuery 72 | ```js 73 | var script = document.createElement('script'); 74 | script.src = '//client.h-cdn.com/loader.js?customer=demo'; 75 | script.type = 'text/javascript'; 76 | document.getElementsByTagName('head')[0].appendChild(script); 77 | ``` 78 | followed by 79 | ```js 80 | hola_cdn.init() 81 | ``` 82 | 83 | Notes: 84 | * It is strongly recommended to NOT to host a local copy of the JS, as this will prevent any updates/bug fixes from reaching you. 85 | * Only load loader.js once (either static or dynamic) 86 | 87 | ## Server side configuration 88 | 89 | In order to allow the client side module to send byte-range requests, please enable CORS on the HTTP server(s) that is serving the video files and verify response headers to MP4/FLV files from this server(s) include the following headers: 90 | 91 | * Access-Control-Allow-Origin: * 92 | * Access-Control-Allow-Methods: HEAD, GET, OPTIONS 93 | * Access-Control-Expose-Headers: Content-Range, Date, Etag, X-Cache 94 | * Access-Control-Allow-Headers: Content-Type, Origin, Accept, Range, Cache-Control 95 | * Access-Control-Max-Age: 600 96 | * Timing-Allow-Origin: * 97 | 98 | For step by step instructions regarding how to enable CORS on different web servers, see the original [CORS documentation] (http://enable-cors.org/server.html). Make sure you add all the required headers, not just '*' referenced in the instructions. 99 | 100 | #### Testing server headers 101 | ```curl -v -H "Origin: " -X OPTIONS -H "Access-Control-Request-Headers: range"