64 lines
1.7 KiB
Vue
Raw Normal View History

2018-11-01 17:20:04 +05:30
<template>
2018-11-05 11:01:27 +05:30
<div>
2019-04-08 19:56:21 +05:30
<section class='mt-2'>
2019-02-19 17:01:31 +05:30
<div>
2018-11-05 11:01:27 +05:30
<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
&mdash; Published on {{ contentData.publish_date }}.
</span>
</div>
<div class="col-md-4 text-right">
2019-04-22 17:52:48 +05:30
<slot></slot>
2018-11-05 11:01:27 +05:30
</div>
</div>
2019-04-22 17:52:48 +05:30
<youtube-player :url="contentData.url" class="mt-3"/>
2018-11-05 11:01:27 +05:30
<hr>
</div>
</section>
<section class="video-description-section">
2019-02-19 17:01:31 +05:30
<div>
2019-04-22 17:52:48 +05:30
<div class="content" v-html="contentData.description">
2018-11-05 11:01:27 +05:30
</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 17:20:04 +05:30
</template>
<script>
2019-03-28 13:44:25 +05:30
import YoutubePlayer from './YoutubePlayer.vue'
2018-11-01 17:20:04 +05:30
export default {
2018-11-05 11:01:27 +05:30
props: ['content', 'type'],
2018-11-13 17:24:07 +05:30
name: 'Video',
2018-11-05 11:01:27 +05:30
data() {
return {
2019-02-27 15:32:36 +05:30
contentData: '',
2018-11-05 11:01:27 +05:30
}
},
2019-03-28 13:44:25 +05:30
components: {
YoutubePlayer
},
2018-11-05 11:01:27 +05:30
mounted() {
2019-02-27 15:32:36 +05:30
this.getContent()
.then(data => this.contentData = data)
2018-11-05 11:01:27 +05:30
},
methods: {
getContent() {
return lms.call('get_content', {
content_type: this.type,
content: this.content
})
}
}
2018-11-01 17:20:04 +05:30
};
2019-04-08 19:56:21 +05:30
</script>