Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
X
xplayer
Project
Project
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
曲欣亮
xplayer
Commits
7c2d7033
Commit
7c2d7033
authored
Feb 06, 2020
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
d30d0a15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
player.html
src/main/resources/page/player.html
+32
-30
No files found.
src/main/resources/page/player.html
View file @
7c2d7033
...
...
@@ -89,38 +89,40 @@ body {
encryptType
:
1
,
vid
:
vid
,
playauth
:
playAuth
},
function
(
player
)
{
},
function
(
x
player
)
{
console
.
log
(
"播放器创建好了。"
)
});
document
.
ο
nkeyd
ο
wn
=
function
(
e
){
var
keyNum
=
window
.
event
?
e
.
keyCode
:
e
.
which
;
if
(
keyNum
==
'32'
){
var
status
=
xplayer
.
getStatus
();
if
(
status
==
'play'
)
{
xplayer
.
pause
();
}
else
{
xplayer
.
play
();
}
}
else
if
(
keyNum
==
'37'
){
//快进
var
videotimes
=
xplayer
.
getDuration
();
var
playnum
=
xplayer
.
getCurrentTime
();
playnum
=
parseInt
(
playnum
-
10
);
if
(
playnum
<=
(
videotimes
-
30
)){
xplayer
.
seek
(
playnum
);
document
.
ο
nkeyd
ο
wn
=
function
(
e
){
var
keyNum
=
window
.
event
?
e
.
keyCode
:
e
.
which
;
if
(
keyNum
==
'32'
){
var
status
=
xplayer
.
getStatus
();
if
(
status
==
'play'
)
{
xplayer
.
pause
();
}
else
{
xplayer
.
play
();
}
}
else
if
(
keyNum
==
'37'
){
//快进
var
videotimes
=
xplayer
.
getDuration
();
var
playnum
=
xplayer
.
getCurrentTime
();
playnum
=
parseInt
(
playnum
-
10
);
if
(
playnum
<=
(
videotimes
-
30
)){
xplayer
.
seek
(
playnum
);
}
}
else
if
(
keyNum
==
'39'
){
var
videotimes
=
xplayer
.
getDuration
();
var
playnum
=
xplayer
.
getCurrentTime
();
playnum
=
parseInt
(
playnum
+
10
);
if
(
playnum
>
15
){
xplayer
.
seek
(
playnum
);
}
else
{
xplayer
.
seek
(
0
);
}
}
}
else
if
(
keyNum
==
'39'
){
var
videotimes
=
xplayer
.
getDuration
();
var
playnum
=
xplayer
.
getCurrentTime
();
playnum
=
parseInt
(
playnum
+
10
);
if
(
playnum
>
15
){
xplayer
.
seek
(
playnum
);
}
else
{
xplayer
.
seek
(
0
);
}
}
e
.
preventDefault
();
}
e
.
preventDefault
();
}
});
}
else
if
(
authJsonObject
.
code
==
300
)
{
scope
.
toLogin
();
}
else
{
...
...
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