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
81a3b72f
Commit
81a3b72f
authored
Feb 13, 2014
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2586 from edx/alex/fix_position_video
Fix for saving video in studio when saving position. BLD-834
parents
409e6e57
d2f17235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
common/lib/xmodule/xmodule/js/spec/video/initialize_spec.js
+14
-0
common/lib/xmodule/xmodule/js/src/video/01_initialize.js
+2
-1
No files found.
common/lib/xmodule/xmodule/js/spec/video/initialize_spec.js
View file @
81a3b72f
...
...
@@ -110,6 +110,20 @@ function (Initialize) {
});
});
it
(
'data contains position 0, async is true'
,
function
()
{
itSpec
({
asyncVal
:
true
,
speedVal
:
undefined
,
positionVal
:
0
,
data
:
{
saved_video_position
:
0
},
ajaxData
:
{
saved_video_position
:
Time
.
formatFull
(
Math
.
round
(
0
))
}
});
});
return
;
function
itSpec
(
value
)
{
...
...
common/lib/xmodule/xmodule/js/src/video/01_initialize.js
View file @
81a3b72f
...
...
@@ -674,6 +674,7 @@ function (VideoPlayer, VideoStorage) {
}
function
saveState
(
async
,
data
)
{
if
(
!
(
$
.
isPlainObject
(
data
)))
{
data
=
{
saved_video_position
:
this
.
videoPlayer
.
currentTime
...
...
@@ -684,7 +685,7 @@ function (VideoPlayer, VideoStorage) {
this
.
storage
.
setItem
(
'speed'
,
data
.
speed
,
true
);
}
if
(
data
.
saved_video_position
)
{
if
(
data
.
hasOwnProperty
(
'saved_video_position'
)
)
{
this
.
storage
.
setItem
(
'savedVideoPosition'
,
data
.
saved_video_position
,
true
);
data
.
saved_video_position
=
Time
.
formatFull
(
data
.
saved_video_position
);
...
...
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