flash

<template>
<div class="flashWarp">
<div id="myContent"></div>
<!-- 组件控制 -->

</div>
</template>


<style scoped>
.flashWarp {
position: fixed;
top: 0px;
width: 100%;
height: 100%;
/* background: rgba(255, 255, 255, 0.3) */
background: black;
display: flex;
align-items: center;
justify-content: center;
}

</style>

<script>
import swfobject from 'es-swfobject'
// import ''
export default {
data() {
return {
// flsahUrl: 'http://www.yjy100.cn/uploadFile/course/coursefile/100351820151129164559.swf'
flsahUrl: 'rtmp://124.239.196.167/vod/&mp4:classroom/10050457620181029095550c.mp4'
}
},
methods: {},
mounted() {
// 构建播放器
if (this.flsahUrl.endsWith('.swf')) {
swfobject.embedSWF(this.flsahUrl, "myContent", "600", "480", "9.0.0", "expressInstall.swf");
} else {
var params = {};
params.quality = "high";
params.bgcolor = "#000000";
// params.allowscriptaccess = "always";
params.allowfullscreen = "true";
var xiSwfUrlStr = "../../static/common/flowplayer/playerProductInstall.swf";
let soFlashVars = {
src: this.flsahUrl,
streamType: "vod",
// autoPlay: "true",
controlBarAutoHide: "true",
controlBarPosition: "bottom"
};
swfobject.embedSWF('../../static/common/flowplayer/StrobeMediaPlayback.swf', "myContent", "800", "500", "9.0.0",
xiSwfUrlStr, soFlashVars,params);
}
}
}

</script>
posted @ 2019-03-22 16:06  码路上的奋斗  阅读(165)  评论(0编辑  收藏  举报