Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ioiotv/io-react

Package Overview
Dependencies
Maintainers
11
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ioiotv/io-react - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

4

package.json
{
"name": "@ioiotv/io-react",
"version": "1.0.4",
"version": "1.1.0",
"description": "Player for ioio.tv services",

@@ -9,3 +9,3 @@ "keywords": [],

"ask-for-promise": "1.3.1",
"axios": "0.26.0",
"axios": "0.26.1",
"react": "17.0.2",

@@ -12,0 +12,0 @@ "react-dom": "17.0.2",

@@ -109,2 +109,3 @@ import { findDOMNode } from "react-dom"

window.a = this
this.writeIntoStatistics = ioServices.writeIntoStatistics
this.loadChannelsSchedules ()

@@ -398,3 +399,3 @@ this.setupRefreshSchedulesInterval ()

{ render } = this.state
, setup = () => {
, setup = channel => {
if ( captionTrack ) captionTrack.mode = 'hidden'

@@ -429,6 +430,6 @@ this.update ({

if ( vPlay && notPlaying ) vPlay.addEventListener ( 'playing', postponedSetup )
else setup ()
else setup ( channel )
return
}
setup ()
setup ( channel )
} // load func.

@@ -435,0 +436,0 @@

import Axios from "axios"
let axios;
let
axios
, statistics = null
, statURL = 'https://api-stats.dev.ioio.tv/collect/tmp_main'
, org_id
;
const ioServices = {
setup ( config ) { // setup connection to the server
axios = Axios.create ({
axios = Axios.create ({
baseURL : config.baseUrl
, timeout : config.timeout
, headers : { accept: "application/json" }
})
})
if ( config.org_id ) {
org_id = config.org_id
statistics = Axios.create ({
baseURL : statURL
, timeout : config.timeout
, headers : { accept: "application/json" }
})
}
} // setup func.
, writeIntoStatistics ( data ) {
if ( statistics == null ) {
console.error (`Signal "${data.action}" is not send. Player's configuration needs a "org_id" field.`)
return
}
statistics.put ( '/record', {
Data : {
org_id
, c_guid : data.channel
, action : data.action
, current_time : data.timestamp
}
, PartitionKey : 'tmp_main'
})
}
, getChannels ( ) {

@@ -17,0 +47,0 @@ return axios.get ( "/channels", { params: { active: 1 }} )

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc