admin 发表于 2016-12-10 12:50:34

八周交易计划2 六强集结 针尖对锋芒

<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <div id="divVideo"></div>
    <script type="text/javascript">
      playVideo({
            elemt: document.getElementById("divVideo"),
            src: "https://jin10videoserver.jin10.com/Act-ss-mp4-hd/f665bad9948f452688d045948e7d3cff/选手片子v5.mp4",
            preload: "true",
            autoplay: "true",
            poster: "",
            loop: "true",
            width: "",
            heigth:""
      });
   functionplayVideo (opt) {
      if (typeof (opt) == "undefined") {
            alert("https://jin10videoserver.jin10.com/Act-ss-mp4-hd/f665bad9948f452688d045948e7d3cff/选手片子v5.mp4");
            return;
      }
      if (typeof (opt.elemt) == "undefined") {
            alert("https://jin10videoserver.jin10.com/Act-ss-mp4-hd/f665bad9948f452688d045948e7d3cff/选手片子v5.mp4");
            return;
      }
      if (typeof (opt.src) == "undefined") {
            alert("https://jin10videoserver.jin10.com/Act-ss-mp4-hd/f665bad9948f452688d045948e7d3cff/选手片子v5.mp4");
            return;
      }
      var _this = this;
      _this.elemt = opt.elemt;                                       
      _this.src = opt.src;                                          
      _this.width = opt.width > 0 ? opt.width + "px" : "100%";      
      _this.height = opt.height > 0 ? opt.height + "px" : "100%";   
      _this.autoplay = opt.autoplay == "true" ? "autoplay" : "";   
      _this.poster = opt.poster;                                 
      _this.preload = opt.preload == "true" ? "preload" : "";
      _this.loop = opt.loop == "true" ? "loop" : "";         
      var str = "<video id='playVideo' controls ";   
      str += " width='" + _this.width + "' height='" + _this.height + "' " + _this.autoplay + " " + _this.preload + " " + _this.loop + " ";
      if (typeof (_this.poster) != "undefined") {
            str += " poster='" + _this.poster + "' >";
      } else {
            str += " > ";
      }
      str += " <source src='" + _this.src + "'type='video/mp4; codecs='avc1.42E01E, mp4a.40.2''/>";
      str += "</video>";
      _this.elemt.innerHTML = str;
    }
    </script>
</body>
页: [1]
查看完整版本: 八周交易计划2 六强集结 针尖对锋芒