aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-23 18:56:23 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-23 18:56:23 -0400
commit778286579008b57a76fbf82235348b613f5c1a5b (patch)
treed5ebe891b97e96eea1039a7259361191d17e84f6 /src
parent0591b8f1e60d1285fd9aac3e61160824948a166b (diff)
Fixed document
Diffstat (limited to 'src')
-rw-r--r--src/client/apis/youtube/YoutubeBox.tsx24
-rw-r--r--src/server/youtubeApi/youtubeApiSample.js2
2 files changed, 3 insertions, 23 deletions
diff --git a/src/client/apis/youtube/YoutubeBox.tsx b/src/client/apis/youtube/YoutubeBox.tsx
index e630c11ae..d2f5112c2 100644
--- a/src/client/apis/youtube/YoutubeBox.tsx
+++ b/src/client/apis/youtube/YoutubeBox.tsx
@@ -81,26 +81,6 @@ export class YoutubeBox extends React.Component<FieldViewProps> {
index = index + 1;
let newTemplate: VideoTemplate = { videoId: id, videoTitle: videoTitle, thumbnailUrl: thumbnailUrl, publishDate: pusblishDate, channelTitle: channelTitle, videoDescription: videoDescription, duration: duration!, viewCount: viewCount! };
runInAction(() => this.curVideoTemplates.push(newTemplate));
-
- // runInAction(() => this.lisOfBackUp.push((
- // <li onClick={() => this.embedVideoOnClick(id, videoTitle)} key={Utils.GenerateGuid() + id}>
- // <div className="search_wrapper">
- // <div style={{ backgroundColor: "yellow" }}>
- // <img src={thumbnailUrl} />
- // <span className="video_duration">{duration}</span>
- // </div>
- // <div className="textual_info">
- // <span className="videoTitle">{videoTitle}</span>
- // <span className="channelName">{channelTitle}</span>
- // <span className="viewCount">{viewCount}</span>
- // <span className="publish_time">{pusblishDate}</span>
- // <p className="video_description">{videoDescription}</p>
-
- // </div>
- // </div>
- // </li>)
- // ));
-
}
}
}
@@ -146,6 +126,7 @@ export class YoutubeBox extends React.Component<FieldViewProps> {
this.videoIds = this.videoIds! + ", " + video.id.videoId;
}
});
+ console.log("Video Ids: ", this.videoIds);
DocServer.getYoutubeVideoDetails(this.videoIds, this.processVideoDetails);
this.backUpSearchResults(videos);
if (this.videoClicked) {
@@ -289,8 +270,7 @@ export class YoutubeBox extends React.Component<FieldViewProps> {
duration = this.convertIsoTimeToDuration(this.videoDetails[index].contentDetails.duration);
viewCount = this.abbreviateViewCount(this.videoDetails[index].statistics.viewCount);
}
- //this.roundPublishTime(pusblishDate);
- //this.roundPublishTime2(video.snippet.publishedAt);
+
return <li onClick={() => this.embedVideoOnClick(video.id.videoId, filteredTitle)} key={Utils.GenerateGuid()}>
<div className="search_wrapper">
diff --git a/src/server/youtubeApi/youtubeApiSample.js b/src/server/youtubeApi/youtubeApiSample.js
index 4fede08aa..f81f0dfb5 100644
--- a/src/server/youtubeApi/youtubeApiSample.js
+++ b/src/server/youtubeApi/youtubeApiSample.js
@@ -167,7 +167,7 @@ function getVideoDetails(auth, args) {
id: args.videoIds
}, function (err, response) {
if (err) {
- console.log('The API returned an error: ' + err);
+ console.log('The API returned an error from details: ' + err);
return;
}
let videoDetails = response.data.items;