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
5a0a8ef6
Commit
5a0a8ef6
authored
Feb 06, 2020
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
bb9be053
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
35 deletions
+33
-35
player.html
src/main/resources/page/player.html
+33
-35
No files found.
src/main/resources/page/player.html
View file @
5a0a8ef6
...
@@ -29,9 +29,9 @@ body {
...
@@ -29,9 +29,9 @@ body {
}
}
</style>
</style>
</head>
</head>
<body
onkeydown=
"keydownProcess"
>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<div
class=
"prism-player"
id=
"J_prismPlayer"
@
keydown=
keydown
></div>
<div
class=
"prism-player"
id=
"J_prismPlayer"
></div>
<el-dialog
:visible
.
sync=
"loginVisible"
style=
"width:800px;margin:auto;"
>
<el-form>
<el-form-item
label=
"用户名:"
label-width=
"75px"
>
<el-input
v-model=
"loginForm.username"
placeholder=
"请输入登陆名"
style=
"width:85%;"
></el-input>
</el-form-item>
<el-form-item
label=
"密码:"
label-width=
"75px"
>
<el-input
type=
"password"
v-model=
"loginForm.password"
placeholder=
"请输入登陆密码"
style=
"width:85%;"
></el-input>
</el-form-item>
</el-form>
<el-dialog
:visible
.
sync=
"loginVisible"
style=
"width:800px;margin:auto;"
>
<el-form>
<el-form-item
label=
"用户名:"
label-width=
"75px"
>
<el-input
v-model=
"loginForm.username"
placeholder=
"请输入登陆名"
style=
"width:85%;"
></el-input>
</el-form-item>
<el-form-item
label=
"密码:"
label-width=
"75px"
>
<el-input
type=
"password"
v-model=
"loginForm.password"
placeholder=
"请输入登陆密码"
style=
"width:85%;"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"loginVisible = false"
>
关闭
</el-button>
<el-button
size=
"mini"
@
click=
"loginVisible = false"
>
关闭
</el-button>
...
@@ -58,6 +58,36 @@ body {
...
@@ -58,6 +58,36 @@ body {
document
.
onkeydown
=
function
(
e
)
{
document
.
onkeydown
=
function
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
var
keyNum
=
window
.
event
?
e
.
keyCode
:
e
.
which
;
console
.
log
(
"keyCode="
+
keyNum
);
var
xplayer
=
window
.
xplayer
;
if
(
!
xplayer
)
{
return
;
}
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
);
}
}
}
}
var
vue
=
new
Vue
({
var
vue
=
new
Vue
({
...
@@ -85,7 +115,7 @@ body {
...
@@ -85,7 +115,7 @@ body {
if
(
authJsonObject
.
code
==
200
)
{
if
(
authJsonObject
.
code
==
200
)
{
var
vid
=
authJsonObject
.
vid
;
var
vid
=
authJsonObject
.
vid
;
var
playAuth
=
authJsonObject
.
playAuth
;
var
playAuth
=
authJsonObject
.
playAuth
;
this
.
xplayer
=
new
Aliplayer
({
window
.
xplayer
=
new
Aliplayer
({
id
:
"J_prismPlayer"
,
id
:
"J_prismPlayer"
,
width
:
"100%"
,
width
:
"100%"
,
height
:
"100%"
,
height
:
"100%"
,
...
@@ -143,38 +173,6 @@ body {
...
@@ -143,38 +173,6 @@ body {
}
}
});
});
},
keydown
(
e
)
{
var
keyNum
=
window
.
event
?
e
.
keyCode
:
e
.
which
;
console
.
log
(
"keyCode="
+
keyNum
);
var
xplayer
=
this
.
xplayer
;
if
(
!
xplayer
)
{
return
;
}
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
);
}
}
}
}
},
},
mounted
()
{
mounted
()
{
...
...
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