Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
b9ee897d
Commit
b9ee897d
authored
Oct 09, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整视频播放JS位置
parent
52249dfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
37 deletions
+35
-37
empirecmsplayer.js
e/data/modadd/moreplayer/empirecmsplayer.js
+0
-37
news.js
skin/default/js/news.js
+35
-0
No files found.
e/data/modadd/moreplayer/empirecmsplayer.js
View file @
b9ee897d
...
...
@@ -95,40 +95,3 @@ function EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl){
str
=
'<scri'
+
'pt type="text/javascript" src="'
+
baseurl
+
'e/data/modadd/moreplayer/jwplayer/jwplayer.js"></scri'
+
'pt><div id="EmpireCMSmyElement">Loading the player...</div><scri'
+
'pt type="text/javascript">jwplayer("EmpireCMSmyElement").setup({ autostart:'
+
autostart
+
',file: "'
+
furl
+
'",height:'
+
height
+
',width:'
+
width
+
' });</scri'
+
'pt>'
;
return
str
;
}
if
(
typeof
jQuery
!==
"undefined"
)
{
(
function
(
$
)
{
//加载乐视视频
$
(
"div.lecloud-video"
).
each
(
function
()
{
var
width
=
640
,
height
=
360
,
rate
=
width
/
height
;
var
video
=
createVideoElement
(
width
,
height
);
$
(
this
).
replaceWith
(
video
);
//按设定的比例调整大小
var
pNode
=
video
.
parentNode
,
toWidth
=
pNode
.
clientWidth
>=
800
?
800
:
pNode
.
clientWidth
,
toHeight
=
toWidth
/
rate
;
setVideo
(
video
,
$
(
this
).
attr
(
'vu'
),
toWidth
,
toHeight
);
});
function
createVideoElement
(
w
,
h
)
{
var
node
=
document
.
createElement
(
'iframe'
);
node
.
setAttribute
(
"allowfullscreen"
,
true
);
node
.
setAttribute
(
"allowtransparency"
,
true
);
node
.
setAttribute
(
"frameborder"
,
"0"
);
node
.
setAttribute
(
"scrolling"
,
"no"
);
//node.setAttribute("width", w);
//node.setAttribute("height", h);
node
.
style
.
maxWidth
=
"100%"
;
return
node
;
}
function
setVideo
(
node
,
vu
,
w
,
h
)
{
node
.
setAttribute
(
"width"
,
w
);
node
.
setAttribute
(
"height"
,
h
);
node
.
src
=
'http://yuntv.letv.com/bcloud.html?uu=pjseptwfce&vu='
+
vu
+
'&pu=510360dfc7&auto_play=1&width='
+
w
+
'&height='
+
h
+
'&lang=zh_CN'
;
}
})(
jQuery
);
}
\ No newline at end of file
skin/default/js/news.js
View file @
b9ee897d
...
...
@@ -252,3 +252,38 @@ $('#favor').click(function () {
}
},
'json'
);
});
(
function
(
$
)
{
//加载乐视视频
$
(
"div.lecloud-video"
).
each
(
function
()
{
var
width
=
640
,
height
=
360
,
rate
=
width
/
height
;
var
video
=
createVideoElement
(
width
,
height
);
$
(
this
).
replaceWith
(
video
);
//按设定的比例调整大小
var
pNode
=
video
.
parentNode
,
toWidth
=
pNode
.
clientWidth
>=
800
?
800
:
pNode
.
clientWidth
,
toHeight
=
toWidth
/
rate
;
setVideo
(
video
,
$
(
this
).
attr
(
'vu'
),
toWidth
,
toHeight
);
});
function
createVideoElement
(
w
,
h
)
{
var
node
=
document
.
createElement
(
'iframe'
);
node
.
setAttribute
(
"allowfullscreen"
,
true
);
node
.
setAttribute
(
"allowtransparency"
,
true
);
node
.
setAttribute
(
"frameborder"
,
"0"
);
node
.
setAttribute
(
"scrolling"
,
"no"
);
//node.setAttribute("width", w);
//node.setAttribute("height", h);
node
.
style
.
maxWidth
=
"100%"
;
return
node
;
}
function
setVideo
(
node
,
vu
,
w
,
h
)
{
node
.
setAttribute
(
"width"
,
w
);
node
.
setAttribute
(
"height"
,
h
);
node
.
src
=
'http://yuntv.letv.com/bcloud.html?uu=pjseptwfce&vu='
+
vu
+
'&pu=510360dfc7&auto_play=1&width='
+
w
+
'&height='
+
h
+
'&lang=zh_CN'
;
}
})(
jQuery
);
\ 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