切换时把背景音乐播放暂停,把暂停的时间放在session里面,另一页开始时读取session的 内容,然后在重那个时间点播放。
$('a.btnNext').one('touchend',function(e){ sessionStorage.bgmPlay=soundBgm.bgmPlay; sessionStorage.bgmTime=soundBgm.bgmPlay?soundBgm.currentTime+soundBgm.context.currentTime-soundBgm.startTime:soundBgm.currentTime; location.href='index.html'; }); ajax调用 bgm放在头部或者尾部不变的地方
只有用框架,背景音乐放父框架,页面放子框架,切换页面只在子框架中切换,不影响父框架。
不用写session那么复杂 用个frame加载播放器 然后把frame的样式修改 让其隐藏 加载页面的时候只替换内容页面 这个播放器额frame不动 不就o了?
切换时把背景音乐播放暂停,把暂停的时间放在session里面,另一页开始时读取session的 内容,然后在重那个时间点播放。
$('a.btnNext').one('touchend',function(e){ sessionStorage.bgmPlay=soundBgm.bgmPlay; sessionStorage.bgmTime=soundBgm.bgmPlay?soundBgm.currentTime+soundBgm.context.currentTime-soundBgm.startTime:soundBgm.currentTime; location.href='index.html'; }); Copyright © 2019- axer.cn 版权所有 湘ICP备2023022495号-12
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务