visualizzazioni video tracciate

This commit is contained in:
matteo
2018-12-02 21:02:12 +01:00
parent cdd0c8be1d
commit 0f38bae769
4 changed files with 69 additions and 9 deletions
+11 -3
View File
@@ -1,5 +1,6 @@
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import YouTube from 'react-youtube'; // eslint-disable-line no-unused-vars
import axios from 'axios';
/* eslint no-console: ["error", { allow: ["info", "error", "warn"] }] */
class VideoPlayer extends Component {
@@ -91,8 +92,7 @@ class VideoPlayer extends Component {
break;
}
}, 500);
this.setState({outsideReject2: reject });
this.setState({ outsideReject2: reject });
})
});
this.state.promise2.then(msg => {
@@ -111,8 +111,16 @@ class VideoPlayer extends Component {
this.state.promise1
.then(
risultato => {
console.info(risultato);
//console.info(risultato);
// post request to local db
axios
.post('http://localhost:8000/test', {
id: risultato.toString()
})
.then(
response => console.info(response.data),
error => console.info(error)
);
// local storage logic for recent reccomender
clearInterval(timerId1);
},