Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
acc8616d
Commit
acc8616d
authored
Aug 05, 2014
by
Muhammad Ammar
Committed by
Alexander Kryklia
Aug 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Video Player Initialisation Issue
parent
11c9dae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
common/djangoapps/terrain/stubs/youtube.py
+3
-11
No files found.
common/djangoapps/terrain/stubs/youtube.py
View file @
acc8616d
...
@@ -16,8 +16,6 @@ To start this stub server on its own from Vagrant:
...
@@ -16,8 +16,6 @@ To start this stub server on its own from Vagrant:
3.) Locally, try accessing http://localhost:8031/ and see that
3.) Locally, try accessing http://localhost:8031/ and see that
you get "Unused url" message inside the browser.
you get "Unused url" message inside the browser.
"""
"""
import
textwrap
from
.http
import
StubHttpRequestHandler
,
StubHttpService
from
.http
import
StubHttpRequestHandler
,
StubHttpService
import
json
import
json
import
time
import
time
...
@@ -26,15 +24,9 @@ from urlparse import urlparse
...
@@ -26,15 +24,9 @@ from urlparse import urlparse
from
collections
import
OrderedDict
from
collections
import
OrderedDict
IFRAME_API_RESPONSE
=
textwrap
.
dedent
(
# Unless we find a better way, we will get the response from iframe api
"if (!window['YT']) {var YT = {loading: 0,loaded: 0};}if (!window['YTConfig']) {var YTConfig"
# once per suite run, instead of using hardcoded response, to avoid issues.
" = {};}if (!YT.loading) {YT.loading = 1;(function(){var l = [];YT.ready = function(f) {if ("
IFRAME_API_RESPONSE
=
requests
.
get
(
'http://www.youtube.com/iframe_api'
)
.
text
"YT.loaded) {f();} else {l.push(f);}};window.onYTReady = function() {YT.loaded = 1;for (var "
"i = 0; i < l.length; i++) {try {l[i]();} catch (e) {}}};YT.setConfig = function(c) {for (var"
" k in c) {if (c.hasOwnProperty(k)) {YTConfig[k] = c[k];}}};var a = document.createElement"
"('script');a.id = 'www-widgetapi-script';a.src = 'http:' + '"
"//s.ytimg.com/yts/jsbin/www-widgetapi-vflxHr_AR.js';a.async = true;var b = "
"document.getElementsByTagName('script')[0];b.parentNode.insertBefore(a, b);})();}"
)
class
StubYouTubeHandler
(
StubHttpRequestHandler
):
class
StubYouTubeHandler
(
StubHttpRequestHandler
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment