<template name="audioComment">
	<view>
		<view class="banner">
			<dever-audio
			:src="item.audio" 
			:pic="item.pic" 
			:control="true"
			:loop="true"
			:load.sync="load"
			ref="audio"
			>
			</dever-audio>
		</view>
		<comment :item="item" :type="`content/audio_comment`" :type_id="item.id"></comment>
	</view>
</template>

<script>
import deverAudio from '@/lib/dever/components/audio.nvue';
import comment from "@/pages/dream/view/comment.vue";
export default {
	name: "audioComment",
	props: {
		control : {
			type : Object,
			value : null
		},
		item : {
			type    : Object,
			value	: null
		},
		index : 0
	},
	data() {
		return {
			load : false,
		}
	},
	mounted() {
		this.control[this.index] = this;
	},
	methods:{
		start : function() {
			this.$refs.audio.start();
		},
		stop : function() {
			this.$refs.audio.stop();
		},
	},
	components:{
		deverAudio,comment
	}
}
</script>

<style>
.banner{
  position: relative;
  width: 750rpx;
  height: 422rpx;
  display: block;
}
</style>