2018-11-01 11:50:04 +00:00
|
|
|
<template>
|
2018-11-05 05:31:27 +00:00
|
|
|
<div>
|
2019-04-08 14:26:21 +00:00
|
|
|
<section class='mt-2'>
|
2019-02-19 11:31:31 +00:00
|
|
|
<div>
|
2019-03-28 08:14:25 +00:00
|
|
|
<youtube-player :url="contentData.url"/>
|
2018-11-05 05:31:27 +00:00
|
|
|
<div class="mt-3 row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<h2>{{ contentData.name }}</h2>
|
|
|
|
<span class="text-muted">
|
|
|
|
<i class="octicon octicon-clock" title="Duration"></i> {{ contentData.duration }} Mins
|
|
|
|
— Published on {{ contentData.publish_date }}.
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-right">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="video-description-section">
|
2019-02-19 11:31:31 +00:00
|
|
|
<div>
|
2018-11-05 05:31:27 +00:00
|
|
|
<div class="content" :html="contentData.description">
|
|
|
|
</div>
|
|
|
|
<div class="text-right hidden">
|
|
|
|
<a class='btn btn-outline-secondary' href="/classrooms/module">Previous</a>
|
|
|
|
<a class='btn btn-primary' href="/classrooms/module">Next</a>
|
|
|
|
</div>
|
|
|
|
<div class="mt-3 text-right">
|
|
|
|
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a
|
|
|
|
Mistake</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
2018-11-01 11:50:04 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
2019-03-28 08:14:25 +00:00
|
|
|
import YoutubePlayer from './YoutubePlayer.vue'
|
|
|
|
|
2018-11-01 11:50:04 +00:00
|
|
|
export default {
|
2018-11-05 05:31:27 +00:00
|
|
|
props: ['content', 'type'],
|
2018-11-13 11:54:07 +00:00
|
|
|
name: 'Video',
|
2018-11-05 05:31:27 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2019-02-27 10:02:36 +00:00
|
|
|
contentData: '',
|
2018-11-05 05:31:27 +00:00
|
|
|
}
|
|
|
|
},
|
2019-03-28 08:14:25 +00:00
|
|
|
components: {
|
|
|
|
YoutubePlayer
|
|
|
|
},
|
2018-11-05 05:31:27 +00:00
|
|
|
mounted() {
|
2019-02-27 10:02:36 +00:00
|
|
|
this.getContent()
|
|
|
|
.then(data => this.contentData = data)
|
2018-11-05 05:31:27 +00:00
|
|
|
},
|
2018-11-14 08:53:06 +00:00
|
|
|
methods: {
|
|
|
|
getContent() {
|
2019-02-27 06:39:57 +00:00
|
|
|
return lms.call('get_content', {
|
|
|
|
type: this.type,
|
|
|
|
content: this.content
|
|
|
|
})
|
2018-11-14 08:53:06 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-01 11:50:04 +00:00
|
|
|
};
|
2019-04-08 14:26:21 +00:00
|
|
|
</script>
|