Commit e9af621aa6b3a87850795323b90948c2390302d9

Authored by ykxie
1 parent e0f0417b

add demo html

src/mobile.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <title>Document</title>
  6 + <script src="js/jquery-1.7.1.js"></script>
  7 + <script src="js/cordova.js"></script>
  8 + <!-- <script src="https://bigbang.gaoxiaobang.com/wx-qa/IOS/cordova.js"></script> -->
  9 +<style>
  10 + *{
  11 + margin: 0;
  12 + padding: 0;
  13 + }
  14 + .title{
  15 + display: block;
  16 + line-height: 44px;
  17 + display: flex;
  18 + justify-content: space-between;
  19 + height: 44px;
  20 + background-color: #1FB6FF;
  21 + color: #FFF;
  22 + }
  23 +</style>
  24 +</head>
  25 +<body>
  26 + <div class="title">
  27 + <div class="back">返回</div>
  28 + <div class="share">分享</div>
  29 + </div>
  30 +
  31 +<script>
  32 + $(function(){
  33 + $('.back').click(function(){
  34 + alert('plugins----')
  35 + var gobackData = {}
  36 + plugins.MBrowserPlugin.goback()
  37 + })
  38 + $('.share').click(function(){
  39 + alert('===========')
  40 + alert(plugins)
  41 + var title = getQuery('title');
  42 + var shareData = {
  43 + title: title,
  44 + url: document.URL,
  45 + text: title
  46 + }
  47 + alert(shareData)
  48 + plugins.MSharePlugin.share(shareData)
  49 + })
  50 + })
  51 +</script>
  52 +</body>
  53 +</html>
0 \ No newline at end of file 54 \ No newline at end of file
src/player-fuben.html
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 <link rel="stylesheet" href="js/audioPlayer/theme.default.css"> 6 <link rel="stylesheet" href="js/audioPlayer/theme.default.css">
7 7
8 <script src="js/jquery-1.7.1.js"></script> 8 <script src="js/jquery-1.7.1.js"></script>
  9 + <script src="https://api.html5media.info/1.1.8/html5media.min.js"></script>
9 <script type="text/javascript" src="js/audioPlayer/jQuery.AudioPlayer.js"></script> 10 <script type="text/javascript" src="js/audioPlayer/jQuery.AudioPlayer.js"></script>
10 <style> 11 <style>
11 #componentWrapper { 12 #componentWrapper {
@@ -25,5 +26,23 @@ @@ -25,5 +26,23 @@
25 }); 26 });
26 </script> 27 </script>
27 </body> 28 </body>
28 -</html> 29 +</html
  30 +
  31 +<!DOCTYPE html>
  32 +<html>
  33 +<head>
  34 +<meta charset="utf-8">
  35 +<title>菜鸟教程(runoob.com)</title>
  36 +</head>
  37 +<body>
  38 +
  39 +<audio id="audioID" autoplay="autoplay" controls="controls" height="50" width="100">
  40 + <source src="http://7xrm8d.com1.z0.glb.clouddn.com/dawangjiaowolaixunsan.mp3" type="audio/mp3" preload="auto" />
  41 + <source src="audio.ogg" type="audio/ogg" preload="auto" />
  42 +</audio>
  43 +
  44 +<p>如果你无法听到该音频,那么可能你的电脑或浏览器不支持该文件格式。</p>
  45 +<p>或者你没有打开扬声器。</p>
29 46
  47 +</body>
  48 +</html>
src/player.html
@@ -341,8 +341,8 @@ @@ -341,8 +341,8 @@
341 <div class="tab-pane active padall15" id="stdin"> 341 <div class="tab-pane active padall15" id="stdin">
342 <input type="text" class="effect-2" id="input" placeholder="标准输入"> 342 <input type="text" class="effect-2" id="input" placeholder="标准输入">
343 <span class="focus-border"></span> 343 <span class="focus-border"></span>
344 - <button class="btn playAudio">播放sss</button>  
345 - <audio id="dawang" controls="controls" src="../static/dawangjiaowolaixunsan.mp3"></audio> 344 +<!-- <button class="btn playAudio">播放sss</button>
  345 + <audio id="dawang" controls="controls" src="../static/dawangjiaowolaixunsan.mp3"></audio> -->
346 </div> 346 </div>
347 <div class="tab-pane padall15" id="cmpinfo"></div> 347 <div class="tab-pane padall15" id="cmpinfo"></div>
348 <div class="tab-pane padall15" id="stderr"></div> 348 <div class="tab-pane padall15" id="stderr"></div>
@@ -386,24 +386,19 @@ @@ -386,24 +386,19 @@
386 $('.back').click(function(){ 386 $('.back').click(function(){
387 alert('plugins----') 387 alert('plugins----')
388 var gobackData = {} 388 var gobackData = {}
389 - document.addEventListener("deviceready", function(){  
390 - Plugins.MSharePlugin.goback()  
391 - }, false)  
392 -  
393 - 389 + plugins.MBrowserPlugin.goback()
394 }) 390 })
395 $('.share').click(function(){ 391 $('.share').click(function(){
396 - alert('=====') 392 + alert('===========')
397 alert(plugins) 393 alert(plugins)
398 var title = getQuery('title'); 394 var title = getQuery('title');
399 -  
400 var shareData = { 395 var shareData = {
401 title: title, 396 title: title,
402 url: document.URL, 397 url: document.URL,
403 text: title 398 text: title
404 } 399 }
405 alert(shareData) 400 alert(shareData)
406 - plugins.MSharePlugin.goback(shareData) 401 + plugins.MSharePlugin.share(shareData)
407 }) 402 })
408 }) 403 })
409 </script> 404 </script>