Lagelanren 2019-10-09 15:55 采纳率: 0%
浏览 3142

微信H5 视频播放不了,浏览器打开可以

用的vue.js,浏览器打开可以播放,微信内白屏,附上地址
http://47.107.97.170:8080/Vote3/get_video_page.do

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="/WEB-INF/view-component/jspInit.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta
    content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
    name="viewport">
<title>集思悦享"AUB云课堂" 省级病例分享晋级赛</title>
<style type="text/css">
*{margin:0px; padding:0px;}
.app{width: 100%; height:100%; top:0px; right:0px; bottom: 0px; left:0px; overflow: hidden;pointer-events: auto;}
.video{width: 100%; height: 100%;}
#my-video{object-fit: cover; object-position: center center;}
</style>
</head>
<body>
    <div style="position: absolute;z-index: 9;" class ="col-xs-12 col-sm-12">
    <button type="button" class="btn btn-danger pull-right" id = "addChannelEdit" onclick="javascript:pass()">跳过视频</button>
</div>
<!-- <div id="app" class="app">
    <video preload='auto' id='my-video' ref="video" :src="videoUrl" @click="player" loop autoplay="autoplay" webkit-playsinline='true' playsinline='true'x-webkit-airplay='true' x5-video-player-type='h5' x5-video-player-fullscreen='true'x5-video-ignore-metadata='true'  width='100%' height='100%'><p> 不支持video</p> </video>
</div> -->

</body>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/vue.min.js"></script>
<link rel="stylesheet"
    href="<%=request.getContextPath()%>/resources/plugins/bootstrap/css/bootstrap.min.css">
<script
    src="<%=request.getContextPath()%>/resources/plugins/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
// vue 解析
var Application = new Vue({
    el: "#app",

    data:{
        videoUrl:'',
        video:null,
        ontrols: true,
        progressControl: true,
    },
    mounted: function(){
        this.videoUrl = "<%=request.getContextPath()%>/resources/video/index.webm";
        this.video = this.$refs.video;

    },
    methods: {
        player:function(){
            this.video.play();
            this.isPlaying = true;  
            sleep(21000);
            this.video.pause()
            pass();
        }

    }



});
function sleep(delay) {
  var start = (new Date()).getTime();
  while ((new Date()).getTime() - start < delay) {
    continue;
  }
}
function pass(){
      window.location.href="<%=request.getContextPath()%>/after_video_index.do"
}
</script>
</html>
  • 写回答

2条回答 默认 最新

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频