assetaudio.vue 771 字节
Newer Older
打打卡夫卡's avatar
打打卡夫卡 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
<template>
	<view>
		<page-head title="asset 音频播放示例" accordion></page-head>
		
		<uni-list>
			<uni-list-item title="播放asset音频" :clickable="true" @tap="testStart"></uni-list-item> 
			<uni-list-item title="停止播放asset音频" :clickable="true" @tap="testStop"></uni-list-item>
		</uni-list>
			
	</view>
</template>

<script>
	import {
		playAssetAudio,
		stopAssetAudio
	} from "../../../uni_modules/uts-advance";
	
	export default {
		data() {
			return {
			}
		},
	
		methods: {

			/**
			 * 测试添加View实例至顶层容器
			 */
			testStart: function() {
				playAssetAudio();
			},
			/**
			 * 测试移除顶层容器的View实例
			 */
			testStop: function() {
				stopAssetAudio();
			}
	
	
		}
	}
</script>

<style>
</style>