vue_drf之视频接口
一、vue-video
1,安装依赖
npm install vue-video-player --save
2,main.js文件中加载组件
require('video.js/dist/video-js.css');
require('vue-video-player/src/custom-theme.css');
import VideoPlayer from 'vue-video-player'
Vue.use(VideoPlayer);
3,在课程详情页中加入组件
course_detial.vue
<template>
<div id="course_detial">
<el-container>
<el-header><Header :current_state="current_state"/></el-header>
<div class="up">
<div class="video">
<video-player class="video-player vjs-custom-skin"
ref="videoPlayer"
:playsinline="true"
:options="playerOptions"
>
</video-player>
</div>
<div class="right">
<div class="title1">{{info.name}}</div>
<div class="data">{{info.students}}人在学 课程总时长:{{info.lessons}}课时/{{info.pub_lessons}}课时 难度:{{info.levels}}</div>
<div class="preferential">
<div>{{info.price_service_type.name}}</div>
<div>距离结束:仅剩 {{Math.floor(remain_time/86400)}}天 {{Math.floor(remain_time%86400/3600)}}小时 {{Math.floor(remain_time%3600/60)}}分 <span>{{Math.floor(remain_time%60)}}</span> 秒秒</div> </div>
<div class="price bac"><span>活动价</span><span class="sp1">¥{{info.current_price}}</span><span class="sp2">¥{{info.price}}</span></div>
<div class="btn1" @click="add(info.id)">加入购物车</div>
</div>
</div>
<div class="tab">
<el-row>
<el-col :span="3"><div @click="num=1" :class="num==1 ? 'light':''">详情介绍</div></el-col>
<el-col :span="3"><div @click="num=2" :class="num==2 ? 'light':''">课程章节</div></el-col>
<el-col :span="4"><div @click="num=3" :class="num==3 ? 'light':''">用户评论<span>(83)</span></div></el-col>
<el-col :span="3"><div @click="num=4" :class="num==4 ? 'light':''">常见问题</div></el-col>
</el-row>
</div>
<div class="content">
<div class="contain">
<div class="left">
<div v-show="num==1">
<img :src="info.brief_url" alt="" width="840px">
</div>
<div v-show="num==2">
<div class="module" v-for="chapater in info.coursechapters">
<div class="module-name"><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94P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OTYsNzI1LjkzNDE4NiA0MDUuMDAzNDI1LDcyNS44NjgwNjQgNDA0LjgxMTY0NCw3MjUuODY4MDY0IFoiIGlkPSLmqKHlnZciPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==" alt=""><span>第{{chapater.chapter}}章·{{chapater.name}}</span>
</div>
<ul>
<li v-for="lesson in chapater.coursesections" @click="play(lesson.section_link)">
<div class="name"><span class="index">{{lesson.orders}}.</span>{{lesson.name}}<span class="free" v-show="lesson.free_trail">免费</span></div>
<div class="time">{{lesson.duration}}<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT7mkq3mlL4gY29weTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSLnrKzkuozniYgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLor77nqIvnq6DoioIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTgyLjAwMDAwMCwgLTgxNS4wMDAwMDApIiBmaWxsPSIjNEE0QTRBIj4KICAgICAgICAgICAgPGcgaWQ9Ikdyb3Vw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MDQ1MiA3NzQsMi4yODU3MDQ1MiBDNzc4LjI1MzgyOSwyLjI4NTcwNDUyIDc4MS43MTQyNjcsNS43NDYxODI1IDc4MS43MTQyNjcsMTAgQzc4MS43MTQyNjcsMTQuMjUzODE3NSA3NzguMjUzODI5LDE3LjcxNDI3MjcgNzc0LDE3LjcxNDI3MjcgTDc3NCwxNy43MTQyNzI3IFogTTc3NCwxIEM3NjkuMDI5MzQyLDEgNzY1LDUuMDI5MzM5OSA3NjUsMTAgQzc2NSwxNC45NzA2NjAxIDc2OS4wMjkzNDIsMTkgNzc0LDE5IEM3NzguOTcxMTAyLDE5IDc4MywxNC45NzA2NjAxIDc4MywxMCBDNzgzLDUuMDI5MzM5OSA3NzguOTcxMTAyLDEgNzc0LDEgTDc3NCwxIFoiIGlkPSLmkq3mlL4tY29weSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=" alt="">
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="right">
<div class="teacher">
<div class="title"><span>授课老师</span></div>
<div class="teacher_detial">
<div class="cont1">
<img alt=" " :src="info.teacher.image">
<div class="name">
<div class="p1">{{info.teacher.name}}</div>
<div class="p2">{{info.teacher.role}}</div>
</div>
</div>
<p class="narrative">{{info.teacher.brief}}</p>
</div>
</div>
<div class="share">
<div class="title"><span>加入答疑交流群</span></div>
<div class="content2">
<img alt=" " src="//hcdn1.luffycity.com/static/frontend/information/551F153CF5BABD20EEB7E8AE3E9F0767_1544009755.8672543.jpeg">
<div>
<p>路飞Python交流群</p>
<p>QQ群号:779111660</p>
</div>
</div>
<div class="lower">
<el-row>
<el-col :span="12">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNThweCIgaGVpZ2h0PSI1OHB4IiB2aWV3Qm94PSIwIDAgNTggNTgiIHZlcnNpb249IjEuMSIgeG1sbnM9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KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" alt="">
<p>定期公开课</p>
</el-col>
<el-col :span="12">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNThweCIgaGVpZ2h0PSI1OHB4IiB2aWV3Qm94PSIwIDAgNTggNTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT7lr7zluIjnrZTnlpE8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0i56ys5LqM54mIIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i6K++56iL6K+m5oOFIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTQ0OS4wMDAwMDAsIC0xMjc2LjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0i5a+85biI562U55aRIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNDQ5LjAwMDAwMCwgMTI3Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwiIGZpbGw9IiNGRjkyNDciIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjI5IiBjeT0iMjkiIHI9IjI5Ij48L2NpcmNsZT4KICAgICAgICAgICAgICAgIDxwb2x5Z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'../common/header'
import Footer from '../common/footer'
import {videoPlayer} from 'vue-video-player';
export default {
name:'course_detial',
data:function () {
return {
current_state:0,
num:1,
info:{},
remain_time:0,
token: localStorage.token || sessionStorage.token,
playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
autoplay: false, //如果true,则自动播放
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 循环播放
preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
language: 'zh-CN',
aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
sources: [{
type: "video/mp4",
src: "http://img.ksbbs.com/asset/Mon_1703/05cacb4e02f9d9e.mp4" //你的视频地址(必填)
}],
poster: "", //视频封面图
width:'680px',
height:'388px',
notSupportedMessage: '此视频暂无法播放,请稍后再试', //允许覆盖Video.js无法播放媒体源时显示的默认信息。
}
}
},
components:{
Header,Footer,videoPlayer
},
methods:{
intervaltimer(){
// 课程优惠倒计时
if(this.remain_time > 0 ){
let timer = setInterval(()=>{
if( this.remain_time < 0 ){
clearInterval(timer)
}else{
--this.remain_time;
}
},1000);
}
},
add:function (course_id) {
if (this.token==null){
this.$router.push('login/')
}
else {
this.$axios.post('http://127.0.0.1:8000/shopcart/',{'course_id':course_id},
{
headers:{
// 附带已经登录用户的jwt token 提供给后端,一定不能疏忽这个空格
'Authorization':'JWT '+this.token
},
responseType:"json",
withCredentials: true,
})
.then(function (res) {
if (res.data.message=='ok'){
alert('添加成功')
}
else if(res.data.message=='error'){
alert('商品已经在购物车中')
}
}).catch(function (error) {
console.log(error.response)
})
}
},
play:function (section_link) {
sessionStorage.vid=section_link;
this.$router.push('/player')
}
},
computed: {
player() {
return this.$refs.videoPlayer.player
}
},
created:function () {
let id=sessionStorage.cid;
let _this=this;
this.$axios.get('http://127.0.0.1:8000/course/course/'+id)
.then(function (res) {
console.log(res.data);
_this.info=res.data;
_this.remain_time=res.data.price_service_type.priceservices[0].remaintime;
_this.playerOptions.poster=res.data.course_img;
_this.intervaltimer();
}).catch(function (error) {
console.log(error.response)
})
}
}
</script>
<style scoped>
.el-header,.el-footer{
padding: 0;
}
.el-header{
height: 80px !important;
}
.up{
width: 1200px;
height: 388px;
margin: 0 auto;
margin-top: 30px;
}
.video{
width: 680px;
height: 388px;
float: left;
background-color: black;
}
.video img{
width: 680px;
height: 388px;
}
.right{
width: 520px;
height: 388px;
float: right;
position: relative;
}
.title1{
font-size: 20px;
color: #333;
padding: 10px 23px;
letter-spacing: .45px;
}
.data{
padding-left: 23px;
padding-right: 23px;
padding-bottom: 16px;
font-size: 14px;
color: #9b9b9b;
}
.preferential{
width: 100%;
height: auto;
background: #fa6240;
font-size: 14px;
color: #4a4a4a;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 23px;
}
.preferential div{
font-size: 16px;
color: #fff;
letter-spacing: .36px;
}
.preferential span{
width: 24px;
height: auto;
display: inline-block;
background: #fafafa;
color: #5e5e5e;
padding: 6px 0;
text-align: center;
}
.price{
width: 100%;
height: auto;
background: #fff;
font-size: 14px;
color: #4a4a4a;
display: flex;
align-items: flex-end;
padding: 5px 23px;
}
.price .sp1{
font-size: 26px;
color: #fa6240;
margin-left: 10px;
display: inline-block;
margin-bottom: -5px;
}
.price .sp2{
font-size: 14px;
color: #9b9b9b;
margin-left: 10px;
text-decoration: line-through;
}
.btn1{
width: 125px;
height: 40px;
background: #ffc210;
border-radius: 4px;
color: #fff;
cursor: pointer;
margin-right: 15px;
outline: none;
border: none;
margin-left: 23px;
position: absolute;
bottom: 20px;
line-height: 40px;
text-align: center;
}
.tab{
width: 1200px;
margin: 0 auto;
height: auto;
background: #fff;
box-shadow: 0 2px 4px 0 #f0f0f0;
}
.el-col div{
margin-right: 15px;
padding: 26px 20px 16px;
font-size: 17px;
cursor: pointer;
}
.light{
border-bottom: 1px solid orange;
}
.content{
background: #FAFAFA;
overflow: hidden;
padding-bottom: 40px;
}
.contain{
width: 1200px;
height: auto;
margin: 0 auto;
margin-top: 30px;
}
.content .left{
width: 880px;
height: auto;
padding: 20px;
background: #fff;
float: left;
box-sizing: border-box;
overflow: hidden;
position: relative;
box-shadow: 0 2px 4px 0 #f0f0f0;
}
.content .right{
width: 300px;
height: auto;
margin-left: 20px;
float: right;
}
.teacher{
background: #fff;
margin-bottom: 20px;
box-shadow: 0 2px 4px 0 #f0f0f0;
}
.title{
font-size: 17px;
color: #4a4a4a;
padding: 18px 14px;
border-bottom: 1px solid #333;
border-bottom-color: rgba(51,51,51,.05);
}
.title span{
display: inline-block;
border-left: 2px solid #ffc210;
padding-left: 12px;
}
.teacher_detial{
padding: 30px 20px;
box-sizing: border-box;
}
.cont1{
height: auto;
display: flex;
align-items: center;
margin-bottom: 12px;
}
.cont1 img{
width: 54px;
height: 54px;
margin-right: 12px;
}
.name .p1{
width: 188px;
font-size: 16px;
color: #4a4a4a;
padding-bottom: 4px;
}
.name .p2{
width: 188px;
font-size: 13px;
color: #9b9b9b;
white-space: nowrap;
}
.narrative{
font-size: 14px;
color: #666;
line-height: 24px
}
.share{
background: #fff;
width: 100%;
height: auto;
padding-bottom: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 4px 0 #f0f0f0;
}
.content2{
height: auto;
margin: 20px;
margin-bottom: 0;
display: flex;
align-items: center;
padding-bottom: 18px;
border-bottom: 1px solid #f3f3f3;
}
.share img{
width: 95px;
height: 95px;
margin-right: 20px;
}
.content2 p{
margin: 0;
margin-bottom: 10px;
font-size: 14px;
}
.lower{
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
}
.lower .el-col{
text-align: center;
margin-top: 15px;
}
.lower img{
width: 58px;
height: 58px;
margin-bottom: 6px;
margin-right: 0;
}
.module{
padding-left: 20px;
padding-right: 20px;
}
.module-name{
padding: 12px;
background: #eee;
border-radius: 2px;
display: flex;
align-items: center;
font-size: 16px;
color: #4a4a4a;
letter-spacing: .26px;
}
li{
padding: 15px 20px 15px 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
li .name{
font-size: 14px;
color: #666;
}
li .time{
font-size: 14px;
color: #666;
letter-spacing: .23px;
opacity: 1;
transition: all .15s ease-in-out;
}
.time img{
margin-left: 15px;
vertical-align: middle;
}
</style>
视频组件实现代码
<template>
<div id="course_detial">
<div class="video">
<video-player class="video-player vjs-custom-skin"
ref="videoPlayer"
:playsinline="true"
:options="playerOptions"
>
</video-player>
</div>
</template> <script>
import {videoPlayer} from 'vue-video-player';
export default {
name:'course_detial',
data:function () {
return {
playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
autoplay: false, //如果true,则自动播放
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 循环播放
preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
language: 'zh-CN',
aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
sources: [{
type: "video/mp4",
src: "http://img.ksbbs.com/asset/Mon_1703/05cacb4e02f9d9e.mp4" //你的视频地址(必填)
}],
poster: "", //视频封面图
width:'680px',
height:'388px',
notSupportedMessage: '此视频暂无法播放,请稍后再试', //允许覆盖Video.js无法播放媒体源时显示的默认信息。
}
}
},
components:{
videoPlayer
},
methods:{
},
computed: {
player() {
return this.$refs.videoPlayer.player
}
},</script>
二、使用保利威云视频
在vue的index.html文件中加入保利威的依赖
<script src='https://player.polyv.net/script/polyvplayer.min.js'></script>
player.vue
<template>
<div id="player">
<div class="header"></div>
<div class="content">
<el-row>
<el-col :span="19" class="left_video">
<div id="video"></div>
</el-col>
<el-col :span="5" class="right">
<div class="course">
<div class="img"><img :src="info.course_img" alt="" height="100%"></div>
<div class="name">{{info.name}}</div>
</div>
<div class="list_name">播放列表</div>
<div class="ss">
<ul>
<li class="section_li" v-for="chapater in info.coursechapters">
<div class="section_title">
<span>章节</span>
<span class="number">{{chapater.chapter}}</span>
<span>{{chapater.name}}</span>
</div>
<ul>
<li class="lesson" v-for="lesson in chapater.coursesections" >
<div :class="vid==lesson.section_link ? 'section_project_active':'section_project'" @click="change(lesson.section_link)" >
<span class="time">课时{{lesson.orders}}</span>
<div class="status"> <p class="complete imperfect"></p> </div>
<h5 class="section_cont">{{lesson.name}}</h5>
<span class="section_time">{{lesson.duration}}</span>
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxM3B4IiB2aWV3Qm94PSIwIDAgMTIgMTMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ4LjIgKDQ3MzI3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Db21iaW5lZCBTaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSIxIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTg3OC4wMDAwMDAsIC0yMjcuMDAwMDAwKSI+CiAgICAgICAgPGcgaWQ9Ikdyb3V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gIDwvZz4KPC9zdmc+" alt="" class="project_img">
</div>
</li>
</ul>
</li>
</ul>
</div> </el-col>
</el-row>
</div>
</div>
</template> <script> export default {
name:"player",
data () {
return {
// 生成播放器的参数
info:{},
vid:sessionStorage.vid,
}
},
created:function () {
let id=sessionStorage.cid;
let _this=this;
this.$axios.get('http://127.0.0.1:8000/course/course/'+id)
.then(function (res) {
_this.info=res.data;
}).catch(function (error) {
console.log(error)
})
},
mounted(){
this.play()
},
methods:{
change:function (vid) {
if (vid==null){
vid='ff6cdf2e72a688b5117a5e923f22401d_f';
}
this.vid=vid;
this.play();
},
play:function () {
let _this = this;
var player = polyvObject('#video').videoPlayer({
wrap: '#player',
width: 1520,
height: 889,
forceH5: true,
vid: _this.vid,
code: 'myRandomCodeValue',
playsafe: function (vid, next) {// 向后端发送请求获取加密的token
_this.$axios.get("http://127.0.0.1:8000/course/polyv",{
params:{
vid: vid,
}
}).then(function (data) {
console.log(data);
next(data.data.token)
}).catch(function (error) {
console.log(error)
}) }
});
}
}
}
</script> <style scoped>
.header{
width: 100%;
height: 80px;
background-color: #14191d;
}
.content{
width: 100%;
height: 889px;
}
.left_video{
height: 889px;
background-color: #333;
}
.right{
height: 889px;
background-color: #34383d;
}
ul{
padding-left: 20px;
margin: 0;
}
.course{
padding: 20px 0 20px 0;
width: 100%;
height: 60px;
overflow: hidden;
}
.course .img{
width: 121px;
height: 60px;
float: left;
margin-right: 10px;
margin-left: 20px;
}
.name{
float: left;
font-size: 16px;
color: #b5b9bc;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 60px;
}
.list_name{
width: 100%;
height: auto;
font-size: 14px;
color: #fff;
text-align: center;
padding: 10px 0;
background: #242424;
}
.ss{
padding: 0;
height: 750px;
overflow: auto ;
}
.section_li{
list-style: none;
height: auto;
position: relative;
}
.section_title{
height: 50px;
line-height: 50px;
font-size: 16px;
color: #b5b9bc;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0;
position: relative;
}
.number{
width: 20px;
height: 20px;
font-size: 14px;
border: 1px solid #d0d0d0;
border-radius: 100%;
text-align: center;
line-height: 20px;
margin-left: 8px;
display: inline-block;
background: #14181d;
}
li{
list-style: none;
}
.lesson:hover{
color: #fff!important;
background: #95969a;
}
.section_project{
width: 100%;
height: 36px;
display: flex;
align-items: center;
font-size: 14px;
color: #fff;
position: relative;
cursor: pointer;
padding: 0;
}
.section_project_active{
width: 100%;
height: 36px;
display: flex;
align-items: center;
font-size: 14px;
color: orange;
position: relative;
cursor: pointer;
padding: 0;
}
.time{
font-size: 12px;
letter-spacing: 0;
width: 45px;
white-space: nowrap;
text-overflow: ellipsis;
}
.status{
width: 12px;
height: 12px;
border-radius: 50%;
border: 1px solid #525456;
margin-left: 5px;
line-height: 12px;
display: flex;
align-items: center;
justify-content: space-around;
}
.section_cont{
width: 160px;
height: 36px;
line-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 8px;
margin-right: 30px;
font-size: 12px;
letter-spacing: .19px;
}
.section_time{
width: 36px;
font-size: 12px;
/*letter-spacing: .23px;*/
/*white-space: nowrap;*/
/*text-overflow: ellipsis;*/
/*overflow: hidden;*/
}
.project_img{
width: 10px;
height: 10px;
margin-left: 15px;
}
</style>
player.vue 发起请求逻辑
<template>
<div id="player">
<div class="header"></div>
<div class="content">
<el-row>
<el-col :span="19" class="left_video">
<div id="video"></div>
</el-col>
<el-col :span="5" class="right">
<div class="course">
<div class="img"><img :src="info.course_img" alt="" height="100%"></div>
<div class="name">{{info.name}}</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template> <script> export default {
name:"player",
data () {
return {
// 生成播放器的参数
info:{},
vid:sessionStorage.vid, #这个是必须要有的,是保利威的视频id
}
},
mounted(){
this.play()
},
methods:{
play:function () {
let _this = this;
var player = polyvObject('#video').videoPlayer({
wrap: '#player',
width: 1520,
height: 889,
forceH5: true,
vid: _this.vid,
code: 'myRandomCodeValue',
playsafe: function (vid, next) {// 向后端发送请求获取加密的token
_this.$axios.get("http://127.0.0.1:8000/course/polyv",{
params:{
vid: vid,
}
}).then(function (data) {
console.log(data);
next(data.data.token)
}).catch(function (error) {
console.log(error)
}) }
});
}
}
}
</script>
后端依赖,polyv.py
import time
import requests
import hashlib class PolyvPlayer(object):
userId = 'xxxxxx' #保利威网站上有,
secretkey = 'xxxxxxx' def tomd5(self, value):
"""取md5值"""
return hashlib.md5(value.encode()).hexdigest() # 获取视频数据的token
def get_video_token(self, videoId, viewerIp, viewerId=None, viewerName='', extraParams='HTML5'):
"""
:param videoId: 视频id
:param viewerId: 看视频用户id
:param viewerIp: 看视频用户ip
:param viewerName: 看视频用户昵称
:param extraParams: 扩展参数
:param sign: 加密的sign
:return: 返回点播的视频的token
"""
ts = int(time.time() * 1000) # 时间戳
plain = {
"userId": self.userId,
'videoId': videoId,
'ts': ts,
'viewerId': viewerId,
'viewerIp': viewerIp,
'viewerName': viewerName,
'extraParams': extraParams
} # 按照ASCKII升序 key + value + key + value... + value 拼接
plain_sorted = {}
key_temp = sorted(plain)
for key in key_temp:
plain_sorted[key] = plain[key] plain_string = ''
for k, v in plain_sorted.items():
plain_string += str(k) + str(v) sign_data = self.secretkey + plain_string + self.secretkey # 取sign_data的md5的大写
sign = self.tomd5(sign_data).upper() # 新的带有sign的字典
plain.update({'sign': sign}) result = requests.post(
url='https://hls.videocc.net/service/v1/token',
headers={"Content-type": "application/x-www-form-urlencoded"},
data=plain
).json()
data = {} if isinstance(result, str) else result.get("data", {}) return {"token": data}
views.py
from rest_framework.response import Response
from lufei_drf.utils.polyv import PolyvPlayer
from rest_framework.views import APIView
class PolyvAPIView(APIView):
def get(self, request):
vid = request.query_params.get("vid")
remote_addr = request.META.get("REMOTE_ADDR")
user_id = 1
user_name = "test"
polyv_video = PolyvPlayer()
verify_data = polyv_video.get_video_token(vid, remote_addr, user_id, user_name)
return Response(verify_data["token"])
vue_drf之视频接口的更多相关文章
- 相机标准之onvif---开放型网络视频接口论坛onvif 简介
什么是ONVIF ? ONVIF:原意为 开放型网络视频接口论坛,即 Open Network Video Interface Forum ,是安讯士.博世.索尼等三家公司在2008年共同成立的一个国 ...
- vue_drf之支付宝接口
一.配置 1,生成应用秘钥和公钥 下载对应系统的秘钥生成工具: https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=10 ...
- 【黑金ZYNQ7000系列原创视频教程】02.视频接口——hdmi编码输出实验
黑金论坛地址: http://www.heijin.org/forum.php?mod=viewthread&tid=36636&extra=page%3D1 爱奇艺地址: http: ...
- thinkphp5开发restful-api接口学习 教程视频 接口文档
目录 1. 获取验证码 2. 用户注册 3. 用户登录 4. 用户上传头像 5. 用户修改密码 6. 用户找回密码 7. 用户绑定手机号 8. 用户绑定邮箱 9. 用户绑定用户名(手机/邮箱) 10. ...
- iiiLab提供的视频解析接口如何使用?转发个简单的使用教程
iiiLab除了提供免费的在线视频解析下载工具,还提供了视频解析接口供有需要的个人和公司调用. iiiLab目前已支持解析下载今日头条.西瓜视频.内涵段子.微博.秒拍.小咖秀.晃咖.火山.快手.抖音. ...
- 分享记录一批免费VIP视频解析接口,不定时更新!
VIP视频接口的作用相信大家都懂,那么,由于接口的维护.开发具有不稳定性,失效率很高.这里收集一些目前可用的接口,如果不能用,请反馈给我删除,感谢大家! 电影<西虹市首富>优酷链接:htt ...
- 不完全解决Android微信HTML5 播放视频的问题(不显示控制条,可交互)
首先你需要知道以下内容: http://ad.weixin.qq.com/learn/2-3-3--%E9%80%9A%E7%94%A8%E5%BA%93 这是微信为广告商开放的API,我一直认为只有 ...
- 【图像处理】【SEED-VPM】2.接口
—————————————————————————————————————————————————————————————— 对比 ①最好是HDMI: ②分量也是高清的范围,得是比点对点的HDMI低一 ...
- DirectShow .Net 实现视频
DirectShow .Net 实现视频 .获取视频采集设备IBaseFilter接口对象的方法 //获取所有视频设备名称 public ArrayList GetVideoInputDevice() ...
随机推荐
- spring mvc 扩展 标签解析
spring mvc 标签解析 InterceptorsBeanDefinitionParser http://www.cnblogs.com/fangjian0423/p/springMVC-int ...
- 关于数据库连接时URL的问题
最近在写一个简单的增删改查的代码时,遇到保存的中文都会变成问号(?),由于刚开始只是一些数据的保存,所以认为之后只要对数据库的编码进行修改即可,但是后来要对数据进行查找的时候发现根本查找不到, 当时用 ...
- Java实现zip压缩文件的解压
需求描述: 前段时间写了一篇博客<Java实现对文本文件MD5加密并ftp传送到远程主机目录>,实现了一部分的业务需求.然而有些业务可能不止传送一个文件,有时候客户需要传多个文件,原有系统 ...
- Gitee(码云)、Github同时配置ssh key
一.cd ~/.ssh 二.通过下面的命令,依次生成两个平台的key $ ssh-keygen -t rsa -C "xxxxxxx@qq.com" -f "github ...
- 安装MySQL5.7.19 网上的文章参考 并做了部分修改
1,从官方网址下载MySQL5.7.19源码包 http://dev.MySQL.com/downloads/mysql/#downloads 2,安装好CentOS6.7 64位操作系统. ...
- python网络编程 双人多人聊天
在学习网路编程时,我们首先要考虑的是其中的逻辑,我们借助打电话的形式来了解网络编程的过程, 我们打电话时属于呼叫方,接电话的属于被呼叫方,那么被呼叫方一直保持在待机状态,等待主呼叫方 呼叫,只有在被呼 ...
- 补发————grid布局
CSS Grid布局是CSS中最强大的布局系统.与flexbox的一位布局不同的是CSS Grid布局是一个二维布局系统,即它可以同时处理列和行.通过将CSS规则应用于父元素和其子元素,就可以轻松使用 ...
- linux redis 多实例安装
前言: Redis 是一个开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库.缓存和消息中间件. 它支持多种类型的数据结构,如 字符串(strings), 散列(hashes), 列表( ...
- Javascript高级编程学习笔记(29)—— BOM(3)location对象
在JS中location是一个神奇的对象 它既是window对象的属性,也是document对象的属性 它的作用主要在于保存当前文档页面的信息,以及将 url 解析为独立的片段 location对象属 ...
- Transaction rolled back because it has been marked as rollback-only
出现这种错误的原因 1.接口A 调用了接口B 2.接口B报异常了,没有在B里面进行try catch捕获 3.接口A对 接口B进行了try catch捕获 因为接口B报异常 会把当前事物A接口的事物( ...