移动端页面开发 总结

 

H5适配解决方案1  pageResponse.js

http://www.cnblogs.com/PeunZhang/p/4517864.html

https://github.com/peunzhang/pageResponse

 

 

参考资料:

http://www.cnblogs.com/tugenhua0707/p/5180841.html

https://segmentfault.com/a/1190000007012616  移动Web开发小结

 

H5页面背景音乐不间断播放解决方案思路

1.sessionStorage存储音乐播放时间

设置: sessionStorage.ctime = '14' /*单位秒*/

结合:var audio_currentTime =document.getElementById(audio').currentTime; 

手指滑动页面跳转设置sessionStorage.ctime的值,跳转后的页面获取这个值,用这个值去设置背景音乐的当前时间,再去播放背影音乐。

audio_currentTime =sessionStorage.ctime;/*获取上一页的播放时间*/

document.getElementById("audio").play();/*播放背景音乐*/

 

2.localstorage存储音乐播放时间

 

posted @ 2017-01-03 18:18  星耀学园  阅读(166)  评论(0)    收藏  举报