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
2568a9b8
Commit
2568a9b8
authored
Jun 14, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #123 from edx/valera/no_autoplay_videoalpha_studio
Valera/no autoplay videoalpha studio
parents
9e0997d3
72d7c9ca
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
2 deletions
+47
-2
common/lib/xmodule/xmodule/js/src/videoalpha/display/video_player.coffee
+1
-1
common/lib/xmodule/xmodule/videoalpha_module.py
+3
-1
lms/djangoapps/courseware/features/videoalpha.feature
+6
-0
lms/djangoapps/courseware/features/videoalpha.py
+36
-0
lms/templates/videoalpha.html
+1
-0
No files found.
common/lib/xmodule/xmodule/js/src/videoalpha/display/video_player.coffee
View file @
2568a9b8
...
@@ -99,7 +99,7 @@ class @VideoPlayerAlpha extends SubviewAlpha
...
@@ -99,7 +99,7 @@ class @VideoPlayerAlpha extends SubviewAlpha
@
video
.
log
'load_video'
@
video
.
log
'load_video'
if
@
video
.
videoType
is
'html5'
if
@
video
.
videoType
is
'html5'
@
player
.
setPlaybackRate
@
video
.
speed
@
player
.
setPlaybackRate
@
video
.
speed
unless
onTouchBasedDevice
()
if
not
onTouchBasedDevice
()
and
$
(
'.video:first'
).
data
(
'autoplay'
)
is
'True'
$
(
'.video-load-complete:first'
).
data
(
'video'
).
player
.
play
()
$
(
'.video-load-complete:first'
).
data
(
'video'
).
player
.
play
()
onStateChange
:
(
event
)
=>
onStateChange
:
(
event
)
=>
...
...
common/lib/xmodule/xmodule/videoalpha_module.py
View file @
2568a9b8
...
@@ -5,6 +5,7 @@ from lxml import etree
...
@@ -5,6 +5,7 @@ from lxml import etree
from
pkg_resources
import
resource_string
,
resource_listdir
from
pkg_resources
import
resource_string
,
resource_listdir
from
django.http
import
Http404
from
django.http
import
Http404
from
django.conf
import
settings
from
xmodule.x_module
import
XModule
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
from
xmodule.raw_module
import
RawDescriptor
...
@@ -147,7 +148,8 @@ class VideoAlphaModule(VideoAlphaFields, XModule):
...
@@ -147,7 +148,8 @@ class VideoAlphaModule(VideoAlphaFields, XModule):
'caption_asset_path'
:
caption_asset_path
,
'caption_asset_path'
:
caption_asset_path
,
'show_captions'
:
self
.
show_captions
,
'show_captions'
:
self
.
show_captions
,
'start'
:
self
.
start_time
,
'start'
:
self
.
start_time
,
'end'
:
self
.
end_time
'end'
:
self
.
end_time
,
'autoplay'
:
settings
.
MITX_FEATURES
.
get
(
'AUTOPLAY_VIDEOS'
,
True
)
})
})
...
...
lms/djangoapps/courseware/features/videoalpha.feature
0 → 100644
View file @
2568a9b8
Feature
:
Video Alpha component
As a student, I want to view course videos in LMS.
Scenario
:
Autoplay is enabled in LMS
Given
the course has a Video component
Then
when I view the video it has autoplay enabled
lms/djangoapps/courseware/features/videoalpha.py
0 → 100644
View file @
2568a9b8
#pylint: disable=C0111
#pylint: disable=W0613
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
lettuce.django
import
django_url
from
common
import
TEST_COURSE_NAME
,
TEST_SECTION_NAME
,
i_am_registered_for_the_course
,
section_location
############### ACTIONS ####################
@step
(
'when I view the video it has autoplay enabled'
)
def
does_autoplay
(
step
):
assert
(
world
.
css_find
(
'.videoalpha'
)[
0
][
'data-autoplay'
]
==
'True'
)
@step
(
'the course has a Video component'
)
def
view_videoalpha
(
step
):
coursename
=
TEST_COURSE_NAME
.
replace
(
' '
,
'_'
)
i_am_registered_for_the_course
(
step
,
coursename
)
# Make sure we have a videoalpha
add_videoalpha_to_course
(
coursename
)
chapter_name
=
TEST_SECTION_NAME
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/edx/Test_Course/Test_Course/courseware/
%
s/
%
s'
%
(
chapter_name
,
section_name
))
world
.
browser
.
visit
(
url
)
def
add_videoalpha_to_course
(
course
):
template_name
=
'i4x://edx/templates/videoalpha/default'
world
.
ItemFactory
.
create
(
parent_location
=
section_location
(
course
),
template
=
template_name
,
display_name
=
'Video Alpha 1'
)
lms/templates/videoalpha.html
View file @
2568a9b8
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
data-start=
"${start}"
data-start=
"${start}"
data-end=
"${end}"
data-end=
"${end}"
data-caption-asset-path=
"${caption_asset_path}"
data-caption-asset-path=
"${caption_asset_path}"
data-autoplay=
"${autoplay}"
>
>
<div
class=
"tc-wrapper"
>
<div
class=
"tc-wrapper"
>
<article
class=
"video-wrapper"
>
<article
class=
"video-wrapper"
>
...
...
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