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
2d7f1b73
Commit
2d7f1b73
authored
Nov 13, 2012
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consolidate logic to compute caption path to server-side, we don't need to do this client-side
parent
71f16d40
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
common/lib/xmodule/xmodule/js/src/video/display/video_caption.coffee
+1
-4
common/lib/xmodule/xmodule/js/src/video/display/video_player.coffee
+0
-1
common/lib/xmodule/xmodule/video_module.py
+4
-1
No files found.
common/lib/xmodule/xmodule/js/src/video/display/video_caption.coffee
View file @
2d7f1b73
...
...
@@ -10,10 +10,7 @@ class @VideoCaption extends Subview
.
bind
(
'DOMMouseScroll'
,
@
onMovement
)
captionURL
:
->
if
@
captionAssetPath
!=
''
"
#{
@
captionAssetPath
}
/
#{
@
youtubeId
}
.srt.sjson"
else
"/static/
#{
@
captionDataDir
}
/subs/
#{
@
youtubeId
}
.srt.sjson"
"
#{
@
captionAssetPath
}
/
#{
@
youtubeId
}
.srt.sjson"
render
:
->
# TODO: make it so you can have a video with no captions.
...
...
common/lib/xmodule/xmodule/js/src/video/display/video_player.coffee
View file @
2d7f1b73
...
...
@@ -31,7 +31,6 @@ class @VideoPlayer extends Subview
el
:
@
el
youtubeId
:
@
video
.
youtubeId
(
'1.0'
)
currentSpeed
:
@
currentSpeed
()
captionDataDir
:
@
video
.
caption_data_dir
captionAssetPath
:
@
video
.
caption_asset_path
unless
onTouchBasedDevice
()
@
volumeControl
=
new
VideoVolumeControl
el
:
@
$
(
'.secondary-controls'
)
...
...
common/lib/xmodule/xmodule/video_module.py
View file @
2d7f1b73
...
...
@@ -96,9 +96,12 @@ class VideoModule(XModule):
return
self
.
youtube
def
get_html
(
self
):
caption_asset_path
=
''
if
isinstance
(
modulestore
(),
MongoModuleStore
)
:
caption_asset_path
=
StaticContent
.
get_base_url_path_for_course_assets
(
self
.
location
)
else
:
# VS[compat]
# cdodge: filesystem static content support.
caption_asset_path
=
"/static/{0}/subs"
.
format
(
self
.
metadata
[
'data_dir'
])
return
self
.
system
.
render_template
(
'video.html'
,
{
'streams'
:
self
.
video_list
(),
...
...
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