GithubHelp home page GithubHelp logo

xcui's Introduction

XTream Codes

3rd party SDK api for stream-codes write in javascript

import { Player } from 'xtream-codes'
// or const { Player } = require('xtream-codes')

// initialize player line api
const player = new Player({
  baseUrl: 'http://server:port',
  // username and password of user line
  auth: {
    username: 'test',
    password: 'test'
  }
})

player.baseURL = 'http://server:port'

// retrieve account line information
player.getAccountInfo()
  .then(console.log)
  .catch(console.log)

// GET Live Stream Categories
player.getLiveStreamCategory()
  .then(console.log)
  .catch(console.log)

// GET VOD Stream Categories
player.getVODStreamCategories()
  .then(console.log)
  .catch(console.log)

// GET LIVE Streams
player.getLiveStreams(category?: number) // (This will get All LIVE Streams in the selected category ONLY)
  .then(console.log)
  .catch(console.log)

// GET VOD Streams 
player.getVODStreams(category?: number)
  .then(console.log)
  .catch(console.log)

// GET VOD Info
player.getVODInfo(id: number) // This will get info such as video codecs, duration, description, directors for 1 VOD
  .then(console.log)
  .catch(console.log)

// GET short_epg for LIVE Streams (same as stalker portal, prints the next X EPG that will play soon)
player.getEPGLivetreams(id: number, limit: number)
  .then(console.log)
  .catch(console.log)

// GET ALL EPG for LIVE Streams (same as stalker portal, but it will print all epg listings regardless of the day)
player.getEPGLivetreams(id: number)
  .then(console.log)
  .catch(console.log)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.