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
1830fb80
Commit
1830fb80
authored
Feb 15, 2012
by
Kyle Fiedler
Browse files
Options
Browse Files
Download
Plain Diff
Merged static-ernie-html5-buttontoggle
parents
95e463c6
2dcdaccb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
css/application.css
+0
-0
css/print.css
+10
-6
js/video_player.js
+25
-9
No files found.
css/application.css
View file @
1830fb80
This source diff could not be displayed because it is too large. You can
view the blob
instead.
css/print.css
View file @
1830fb80
.header-wrapper
{
display
:
none
;}
#accordion
{
display
:
none
;}
.ui-accordion
{
display
:
none
;
visibility
:
hidden
;
width
:
0%
;
}
.header-wrapper
{
display
:
none
;
}
#accordion
{
display
:
none
;
}
.ui-accordion
{
display
:
none
;
visibility
:
hidden
;
width
:
0%
;
}
js/video_player.js
View file @
1830fb80
...
...
@@ -196,7 +196,7 @@ function onYouTubePlayerAPIReady() {
'onStateChange'
:
onPlayerStateChange
}
});
updateytplayerInfoInterval
=
setInterval
(
update
ytplayerInfo
,
5
00
);
updateytplayerInfoInterval
=
setInterval
(
update
HTML5ytplayerInfo
,
2
00
);
ajax_videoInterval
=
setInterval
(
ajax_video
,
5000
);
}
...
...
@@ -300,15 +300,32 @@ function onPlayerError(errorCode) {
// alert("An error occured: " + errorCode);
}
function
updateytplayerInfo
()
{
if
(
ytplayer
.
getPlayerState
()
!=
3
)
{
$
(
"#slider"
).
slider
(
"option"
,
"max"
,
ytplayer
.
getDuration
());
$
(
"#slider"
).
slider
(
"option"
,
"value"
,
ytplayer
.
getCurrentTime
());
// Currently duplicated to check for if video control changed by clicking the video for HTML5
// Hacky b/c of lack of control over YT player
function
updateHTML5ytplayerInfo
()
{
var
player_state
=
getPlayerState
();
if
(
player_state
!=
3
)
{
$
(
"#slider"
).
slider
(
"option"
,
"max"
,
ytplayer
.
getDuration
());
$
(
"#slider"
).
slider
(
"option"
,
"value"
,
ytplayer
.
getCurrentTime
());
}
if
(
getPlayerState
()
==
1
){
update_captions
(
getCurrentTime
());
if
(
player_state
==
1
){
update_captions
(
getCurrentTime
());
}
if
(
player_state
==
1
&&
$
(
"#video_control"
).
hasClass
(
"play"
))
$
(
"#video_control"
).
removeClass
().
addClass
(
"pause"
);
else
if
(
player_state
==
2
&&
$
(
"#video_control"
).
hasClass
(
"pause"
))
$
(
"#video_control"
).
removeClass
().
addClass
(
"play"
);
}
function
updateytplayerInfo
()
{
var
player_state
=
getPlayerState
();
if
(
player_state
!=
3
)
{
$
(
"#slider"
).
slider
(
"option"
,
"max"
,
ytplayer
.
getDuration
());
$
(
"#slider"
).
slider
(
"option"
,
"value"
,
ytplayer
.
getCurrentTime
());
}
if
(
player_state
==
1
){
update_captions
(
getCurrentTime
());
}
// updateHTML("videoduration", getDuration());
// updateHTML("videotime", getCurrentTime());
// updateHTML("startbytes", getStartBytes());
...
...
@@ -432,4 +449,4 @@ function clearVideo() {
if
(
ytplayer
)
{
ytplayer
.
clearVideo
();
}
}
\ No newline at end of file
}
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