Using youtube api (v3) instead of v2 to get the video duration .

TNL-2413
This commit is contained in:
muzaffaryousaf
2015-06-23 14:23:15 +05:00
parent 69a1a069e9
commit 7dfd567cb5
30 changed files with 222 additions and 148 deletions

View File

@@ -44,7 +44,7 @@ from lms.envs.common import (
PROFILE_IMAGE_SECRET_KEY, PROFILE_IMAGE_MIN_BYTES, PROFILE_IMAGE_MAX_BYTES,
# The following setting is included as it is used to check whether to
# display credit eligibility table on the CMS or not.
ENABLE_CREDIT_ELIGIBILITY
ENABLE_CREDIT_ELIGIBILITY, YOUTUBE_API_KEY
)
from path import path
from warnings import simplefilter
@@ -654,10 +654,10 @@ CELERY_QUEUES = {
YOUTUBE = {
# YouTube JavaScript API
'API': 'www.youtube.com/iframe_api',
'API': 'https://www.youtube.com/iframe_api',
# URL to test YouTube availability
'TEST_URL': 'gdata.youtube.com/feeds/api/videos/',
# URL to get YouTube metadata
'METADATA_URL': 'https://www.googleapis.com/youtube/v3/videos',
# Current youtube api for requesting transcripts.
# For example: http://video.google.com/timedtext?lang=en&v=j_jEn79vS3g.
@@ -996,6 +996,9 @@ ELASTIC_FIELD_MAPPINGS = {
XBLOCK_SETTINGS = {
"VideoDescriptor": {
"licensing_enabled": FEATURES.get("LICENSING", False)
},
'VideoModule': {
'YOUTUBE_API_KEY': YOUTUBE_API_KEY
}
}