You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
7.6KB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TT产品上线流程 金标</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
  7. <meta name="apple-mobile-web-app-capable" content="yes" />
  8. <meta name="full-screen" content="true" />
  9. <meta name="screen-orientation" content="portrait" />
  10. <meta name="x5-fullscreen" content="true" />
  11. <meta name="360-fullscreen" content="true" />
  12. <style>
  13. html, body {
  14. -ms-touch-action: none;
  15. background: #ffffff;
  16. padding: 0;
  17. border: 0;
  18. margin: 0;
  19. height: 100%;
  20. }
  21. #videoDiv{
  22. width: 1px;
  23. height: 1px;
  24. display: none;
  25. position: absolute;
  26. top: 0;
  27. left: 0;
  28. background: #000000;
  29. }
  30. #video1,#video2,#video3,#video4,#video5,#video6,#video7{
  31. width: 1px;
  32. height: 1px;
  33. display: none;
  34. object-fit:cover;
  35. }
  36. #img{
  37. position: absolute;
  38. top: 5%;
  39. right: 2%;
  40. width: 150px;
  41. height: 30px;
  42. }
  43. </style>
  44. </head>
  45. <body>
  46. <div style="margin: auto;width: 100%;height: 100%;" class="egret-player"
  47. data-entry-class="Main"
  48. data-orientation="auto"
  49. data-scale-mode="showAll"
  50. data-frame-rate="30"
  51. data-content-width="640"
  52. data-content-height="960"
  53. data-multi-fingered="2"
  54. data-show-fps="false" data-show-log="false"
  55. data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
  56. </div>
  57. <div id="videoDiv" onclick="clickVideo()">
  58. <img id="img" src="resource/assets/sound/deleVideo.png" alt="">
  59. <video id="video1" src="resource/assets/sound/video1.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  60. <video id="video2" src="resource/assets/sound/video2.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  61. <video id="video3" src="resource/assets/sound/video3.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  62. <video id="video4" src="resource/assets/sound/video4.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  63. <video id="video5" src="resource/assets/sound/video5.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  64. <video id="video6" src="resource/assets/sound/video6.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  65. <video id="video7" src="resource/assets/sound/video7.mp4" preload="auto" playsinline="true" x-webkit-airplay="true" webkit-playsinline="true" x5-playsinline="true"></video>
  66. </div>
  67. <audio id="music1"><source src="resource/assets/sound/bg.mp3" type="audio/mpeg"></audio>
  68. <script>
  69. var audio=document.getElementById("music1");
  70. audio.loop=true;
  71. document.addEventListener("DOMContentLoaded",function(){
  72. audio.play();
  73. document.addEventListener("WeixinJSBridgeReady",function(){
  74. audio.play();
  75. },false);
  76. });
  77. var musicstart=true;
  78. function audioPaly() {
  79. musicstart=true;
  80. audio.muted=false;
  81. audio.volume=1;
  82. audio.play();
  83. }
  84. function audioPause() {
  85. musicstart=false;
  86. audio.muted=true;
  87. audio.volume=0;
  88. audio.pause();
  89. }
  90. </script>
  91. <script>
  92. function skipPage(){
  93. window.location.href="https://shimo.im/docs/33D8cpjdDYW8HDxD";
  94. var timestamp=new Date().getTime();
  95. localStorage.setItem('page', "10");
  96. localStorage.setItem('time', timestamp);
  97. localStorage.setItem('showAgain', "1");
  98. }
  99. // 视频播放
  100. var videoDiv = document.getElementById("videoDiv");
  101. var videoArr = ["video1","video2","video3","video4","video5","video6","video7"];
  102. function videoPlay(e){
  103. var video;
  104. video = document.getElementById(videoArr[e-1]);
  105. console.log(video)
  106. videoDiv.style.display = "block";
  107. videoDiv.style.width = "100%";
  108. videoDiv.style.height = "100%";
  109. video.style.width = "100%";
  110. video.style.height = "100%";
  111. video.style.display = "block";
  112. video.setAttribute("x5-video-player-type", "h5");
  113. video.setAttribute("x5-videoplayer-fullscreen", "true");
  114. video.play();
  115. }
  116. function clickVideo(){
  117. videoDiv.style.display = "none";
  118. videoDiv.style.width = 1+"px";
  119. videoDiv.style.height = 1+"px";
  120. var videoPause;
  121. for(var i=0;i<videoArr.length;i++){
  122. console.log(videoArr[i])
  123. videoPause = document.getElementById(videoArr[i]);
  124. videoPause.style.width = 1+"px";
  125. videoPause.style.height = 1+"px";
  126. videoPause.style.display = "none";
  127. videoPause.pause();
  128. }
  129. }
  130. </script>
  131. <script>
  132. var loadScript = function (list, callback) {
  133. var loaded = 0;
  134. var loadNext = function () {
  135. loadSingleScript(list[loaded], function () {
  136. loaded++;
  137. if (loaded >= list.length) {
  138. callback();
  139. }
  140. else {
  141. loadNext();
  142. }
  143. })
  144. };
  145. loadNext();
  146. };
  147. var loadSingleScript = function (src, callback) {
  148. var s = document.createElement('script');
  149. s.async = false;
  150. s.src = src;
  151. s.addEventListener('load', function () {
  152. s.parentNode.removeChild(s);
  153. s.removeEventListener('load', arguments.callee, false);
  154. callback();
  155. }, false);
  156. document.body.appendChild(s);
  157. };
  158. var xhr = new XMLHttpRequest();
  159. xhr.open('GET', './manifest.json?v=' + Math.random(), true);
  160. xhr.addEventListener("load", function () {
  161. var manifest = JSON.parse(xhr.response);
  162. var list = manifest.initial.concat(manifest.game);
  163. loadScript(list, function () {
  164. /**
  165. * {
  166. * "renderMode":, //Engine rendering mode, "canvas" or "webgl"
  167. * "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
  168. * "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
  169. * "calculateCanvasScaleFactor": //a function return canvas scale factor
  170. * }
  171. **/
  172. egret.sys.screenAdapter = new easy.EasyGameFullScreen();
  173. egret.runEgret({ renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor:function(context) {
  174. var backingStore = context.backingStorePixelRatio ||
  175. context.webkitBackingStorePixelRatio ||
  176. context.mozBackingStorePixelRatio ||
  177. context.msBackingStorePixelRatio ||
  178. context.oBackingStorePixelRatio ||
  179. context.backingStorePixelRatio || 1;
  180. return (window.devicePixelRatio || 1) / backingStore;
  181. }});
  182. });
  183. });
  184. xhr.send(null);
  185. </script>
  186. </body>
  187. </html>