Appearance
广告播放器
第1步:package.json
引入库
点击查看源码
js
"@extscreen/es-component": "3.0.1",
"@extscreen/es-player": "x.x.x",
"@extscreen/es-ad-player": "x.x.x",
第2步:main-native.js
中注册组件
点击查看源码
js
//@extscreen/es-ad-player 使用的css
import '@extscreen/es-ad-player/dist/index.css';
import {ESComponent} from "@extscreen/es-component";
Vue.use(ESComponent)
第3步:ESPage
页面中中引入组件
点击查看源码
vue
<template>
<div class="es-ad-player-root-css">
<es-ad-player
ref="es_ad_player"
class="es-ad-player-css"
:test-server="true"
:player-width="1920"
:player-height="1080"
:player-z-index="0"
@onPlayerError="onPlayerError"
@onPlayerPlaying="onPlayerPlaying"
@onPlayerInitialized="onPlayerInitialized"/>
</div>
</template>
<script>
import {ESADPlayer} from "@extscreen/es-ad-player";
export default {
components: {
'es-ad-player': ESADPlayer,
}
}
</script>