video.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <meta name="format-detection"content="telephone=no">
  8. <title>index</title>
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  10. <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
  11. <link rel="stylesheet" href="../../css/aui.css">
  12. <link rel="stylesheet" href="../../css/projeck.css">
  13. <style media="screen">
  14. body,html{
  15. margin: 0;
  16. background: #fff;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <div class="api_layout">
  22. <!-- <header class="header-login">
  23. <img class="backBtn" src="../../image/btn_back.png" alt="" tapmode onclick="backIndex()">
  24. <p class="api_text">视频</p>
  25. </header> -->
  26. </div>
  27. <!-- <div class="loading_">
  28. <span></span>
  29. </div> -->
  30. </body>
  31. </html>
  32. <script type="text/javascript" src="../../script/api.js"></script>
  33. <!-- <script src="../../script/fastclick.min.js"></script> -->
  34. <!-- <script src="../../script/aui-toast.js"></script> -->
  35. <script src="../../script/config.js"></script>
  36. <script type="text/javascript">
  37. var toast = new auiToast();
  38. apiready = function () {
  39. $api.fixStatusBar($api.dom('header') );
  40. var urls = api.pageParam.videoUrl,title = api.pageParam.title;
  41. openVideo(urls);
  42. }
  43. function openVideo(url) {
  44. var neteasePlayer = api.require('neteasePlayer');
  45. neteasePlayer.open({
  46. title:'视频',
  47. definition:["高清","标清","流畅"],
  48. styles:{
  49. head:{
  50. bg: 'rgba(161,161,161,1)',
  51. height: 44,
  52. title:{
  53. size:20,
  54. color:'#fff',
  55. width:100,
  56. leftMargin:10
  57. },
  58. backSize: 44,
  59. // backImg:'widget://image/back.png',
  60. definition:{
  61. bg:'#fff',
  62. textSize:14,
  63. textColor:"#FFF",
  64. textWidth: 30,
  65. marginRight:5
  66. },
  67. },
  68. playCenterBtn:{
  69. size : 44,
  70. // playCenterImg:'fs://img/play.png',
  71. // pauseCenterImg:'fs://img/pause.png',
  72. },
  73. foot:{
  74. bg: 'rgba(0,0,0,0.5)',
  75. height: 44,
  76. playBtn:{
  77. size: 44,
  78. // playImg:'widget://image/play.png',
  79. // pauseImg:'widget://image/pause.png',
  80. marginLeft:5
  81. },
  82. currentTimeLabel:{
  83. textSize:10,
  84. textColor:"#FFF",
  85. textWidth: 50,
  86. marginLeft:5
  87. },
  88. seekBar:{
  89. // sliderImg:'widget://image/circle.png',
  90. sliderW : 20,
  91. sliderH : 20,
  92. progressColor: '#696969',
  93. progressSelected: '#76EE00',
  94. marginLeft:10,
  95. marginRight:10
  96. },
  97. totalTimeLabel:{
  98. textSize:10,
  99. textColor:"#FFF",
  100. textWidth: 50,
  101. marginRight:5
  102. },
  103. voiceBtn:{
  104. size:44,
  105. // muteImg:'widget://img/muteImg.png',
  106. // disMuteImg:'widget://img/disMuteImg.png',
  107. },
  108. fullscreenBtn:{
  109. size:44,
  110. // verticalImg:'widget://image/vertical.png',
  111. // horizontalImg:'widget://image/horizontal.png',
  112. }
  113. } },
  114. path:url,
  115. autoPlay: true
  116. },function(ret, err){
  117. if(ret){
  118. alert(JSON.stringify(ret));
  119. } else {
  120. alert(JSON.stringify(err));
  121. }
  122. });
  123. // var obj = api.require('UIPLPlayer');
  124. // obj.openPlayer({
  125. // rect:
  126. // { x: 0,
  127. // y: 70,
  128. // w: api.winWidth,
  129. // h: $api.winHeight
  130. // },
  131. // title: '返回',
  132. // videoUrlPath: url,
  133. // fixedOn: api.frameName,
  134. // }, function(ret, err) {
  135. // if(ret){
  136. // console.log(ret);
  137. // }else{
  138. // alert(JSON.stringify(err));
  139. // }
  140. // });
  141. }
  142. // function backIndex() {
  143. // api.closeWin();
  144. // var UIPLPlayer = api.require('UIPLPlayer');
  145. // UIPLPlayer.closePlayer();
  146. // }
  147. // // video
  148. // function functionName(url) {
  149. // var mediaPlayer = api.require('aliyunLive');
  150. // mediaPlayer.prepareToPlay({
  151. // url:url
  152. // }, function(ret, err) {
  153. // if(ret && ret.status){
  154. // alert("MediaPlayer Prepare Ready");
  155. // var mediaPlayer = api.require('aliyunLive');
  156. // mediaPlayer.play();
  157. // }
  158. // });
  159. // }
  160. </script>