Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
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
夏彬
zuiketang
Commits
7a3e0652
Commit
7a3e0652
authored
Oct 19, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改视频自适应
parent
f267b57c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
video.php
src/frontend/views/home/video.php
+0
-7
MP_verify_cGnhDtidLEiMVuZg.txt
src/frontend/web/MP_verify_cGnhDtidLEiMVuZg.txt
+1
-0
video-play.vue
src/frontend/web/js/home/components/video-play.vue
+15
-9
No files found.
src/frontend/views/home/video.php
View file @
7a3e0652
...
@@ -35,11 +35,4 @@ $this->registerJs($js);
...
@@ -35,11 +35,4 @@ $this->registerJs($js);
</div>
</div>
<div
class=
"xs-show-bg"
></div>
<div
class=
"xs-show-bg"
></div>
<script
type=
'text/javascript'
>
$
(
function
()
{
var
wVideo
=
$
(
'.video-detail-info'
).
width
();
$
(
'#my-video-play'
).
css
(
'width'
,
wVideo
);
})
</script>
<div
class=
"copyright"
>
© 2016 c.pp.cc 皖ICP备13046642号
</div>
<div
class=
"copyright"
>
© 2016 c.pp.cc 皖ICP备13046642号
</div>
src/frontend/web/MP_verify_cGnhDtidLEiMVuZg.txt
0 → 100644
View file @
7a3e0652
cGnhDtidLEiMVuZg
\ No newline at end of file
src/frontend/web/js/home/components/video-play.vue
View file @
7a3e0652
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</div>
</div>
</div>
</div>
<div
class=
"video-main"
>
<div
v-show=
"videoShow"
class=
"video-main"
>
<video
id=
"my-video-play"
class=
"video-js vjs-default-skin vjs-big-play-centered"
<video
id=
"my-video-play"
class=
"video-js vjs-default-skin vjs-big-play-centered"
controls
preload=
"auto"
>
controls
preload=
"auto"
>
<source
:src=
"coursewareInfo.videoUrl"
type=
"video/mp4"
/>
<source
:src=
"coursewareInfo.videoUrl"
type=
"video/mp4"
/>
...
@@ -108,8 +108,6 @@
...
@@ -108,8 +108,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<script>
<script>
...
@@ -127,7 +125,8 @@
...
@@ -127,7 +125,8 @@
weixinCheckHandler: false,
weixinCheckHandler: false,
reload: false,
reload: false,
isMobile: false,
isMobile: false,
isWeixin: false
isWeixin: false,
videoShow: false
}
}
}
,
}
,
watch: {
watch: {
...
@@ -245,20 +244,27 @@
...
@@ -245,20 +244,27 @@
}
,
}
,
components: {
}
,
components: {
}
,
ready(){
ready(){
var self = this;
this.isMobile = this.coursewareInfo.isMobile;
this.isMobile = this.coursewareInfo.isMobile;
this.isWeixin = Utils.isWeixin();
this.isWeixin = Utils.isWeixin();
videojs("
my
-
video
-
play
", {
videojs("
my
-
video
-
play
", {
"
controls
": true,
"
controls
": true,
"
autoplay
": false,
"
autoplay
": false,
"
language
": "
zh
-
CN
",
"
language
": "
zh
-
CN
",
"
width
": 640,
"
height
": 264,
poster: this.coursewareInfo.previewUrl
poster: this.coursewareInfo.previewUrl
}
).ready(function () {
}
).ready(function () {
var myPlayer = this;
var myPlayer = this;
var rate = 9 / 16;
// EXAMPLE: Start playing the video.
$('#my-video-play').css('width', '100%');
// myPlayer.play();
var wVideo = $('.video-detail-info').width();
var hVideo = wVideo * rate;
$('#my-video-play').css('height', hVideo);
window.onresize = function () {
var wVideo = $('.video-detail-info').width();
var hVideo = wVideo * rate;
$('#my-video-play').css('height', hVideo);
}
;
self.videoShow = true;
}
);
}
);
}
}
...
...
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