Archived
commit prepotente
This commit is contained in:
+12
-7
@@ -7,12 +7,15 @@ import { withRouter } from 'react-router-dom';
|
||||
class VideoPlayer extends React.Component {
|
||||
state = {
|
||||
opt: {
|
||||
height: '390',
|
||||
width: '640',
|
||||
// height: '390',
|
||||
// width: '640',
|
||||
playerVars: {
|
||||
// https://developers.google.com/youtube/player_parameters
|
||||
autoplay: 0,
|
||||
modestbranding: 1
|
||||
modestbranding: 1,
|
||||
fs: 0,
|
||||
iv_load_policy:3,
|
||||
rel: 0
|
||||
}
|
||||
},
|
||||
promise1: null,
|
||||
@@ -91,10 +94,12 @@ class VideoPlayer extends React.Component {
|
||||
error => console.info(error, videoIdWatched.toString())
|
||||
);
|
||||
// local storage logic for recent reccomender
|
||||
// let temp=localStorage.getItem('lastWatched');
|
||||
// temp.push({id: videoIdWatched.toString(), date: new Date})
|
||||
|
||||
|
||||
let tmp = JSON.parse(localStorage.getItem('lastWatched'))
|
||||
tmp.push({
|
||||
'id': videoIdWatched.toString(),
|
||||
'date' : new Date()
|
||||
});
|
||||
localStorage.setItem('lastWatched', JSON.stringify(tmp));
|
||||
//.finally(()=>{})
|
||||
clearInterval(timerId1);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user