node package manager

kollus-sdk-js

Kollus SDK for JS

Build Status Coverage Status

Introduction

Unofficial Kollus SDK Library for JS

Table of contents:

Requirement

Installation

To use this library install it through npm , run

And install it

npm install kollus-sdk-js

or download lastest release.

unzip kollus-sdk-js-v0.2.2.zip
# or
tar xvfz kollus-sdk-js-v0.2.2.tar.gz

How to use

if assets folder is '[dest_path]/assets/js/'.

npm

cp node_modules/kollus-sdk-js/dist/* [dest_path]/assets/js/
cp node_modules/ua-parser-js/src/ua-parser.js [dest_path]/assets/js/
cp node_modules/ua-parser-js/dist/ua-parser.min.js [dest_path]/assets/js/

zip or tgz

cp kollus-sdk-js-1.0.0/dist/* [dest_path]/assets/js/
cp ua-parser-js/src/ua-parser.js [dest_path]/assets/js/
cp ua-parser-js/dist/ua-parser.min.js [dest_path]/assets/js

Make & use site-helper.js

You must make & use 'site-helper.js.'

# you must make & use site-helper.js
touch [dest_path]/assets/js/site-helper.js

edit 'site-helper.js'.

Sample helper

  • sample/empty-site-helper.php
  • sample/bootstrap-site-helper.php
$(document).ready(function() {
    KollusClient.init({
        kollusDomain: 'kr.kollus.com'
        ... more options ...
    });
});

Attach js files to html page's footer

Attach below code to html page's footer.

...
</div>
 
<!--[if lt IE 10]>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script
<![endif]-->
<!--[if (gte IE 10)|!(IE)]><!-->
<script src="//code.jquery.com/jquery-2.2.0.min.js"></script>
<!--<![endif]-->
<script src="assets/js/ua-parser.min.js"></script>
<script src="assets/js/kollus-sdk.min.js"></script>
<!-- you must make & use site-helper.js -->
<script src="assets/js/site-helper.js"></script>
 
</body>
</html>

Supported OS and browsers

Browser version uploadFileByUploadUrl playBy downloadBy playDownloadBy
Windows IE 8 Not supported
IE 9 Not supported
IE 10
IE 11
Edge
Chrome
Firefox
Opera
Mac OS Safari Not supported Not supported
Chrome Not supported Not supported
Firefox Not supported Not supported
Opera Not supported Not supported
iOS Safari
Chrome
Firefox Not supported Not supported Not supported
Opera Not supported Not supported Not supported
Android Internet Browser
Chrome
Firefox
Opera

User interfaces(functions)

  • uploadFileByUploadUrl : for html5 file upload by upload url api
  • playByMediaContentKey : play media by media content key
  • playByMediaToken : play media by media token
  • playByWebToken : web token 으로 미디어 재생을 위한 함수
  • downloadByMediaContentKey : download media by media content key
  • downloadByMediaToken : download media by media token
  • downloadByWebToken : web token 으로 미디어 다운로드 받기 위한 함수
  • playDownloadByMediaContentKey : play downloaded media by media content key
  • playDownloadByMediaToken : play downloaded media by media token
  • playDownloadByWebToken : web token 으로 이미 다운받은 미디어 재생을 위한 함수
  • downloadByMediaDatas : download medias by media data at a time
  • init : initailize
  • getLinkByMediaContentKey : get link by media content key
  • getLinkByMediaToken : get link by media token
  • getLinkByWebToken : web token 을 이용해서 Kollus Player 을 호출하는 URL을 반환합니다.

Build && Test

Build

npm install
npm run build

Test

testing by nodejs

npm run test:node

testing by testem

npm run test:dev

More information

Please see Wiki

License

See LICENSE for more information