return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>javascript - How to tell if soundmanager2 is using html5? - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to tell if soundmanager2 is using html5? - Stack Overflow

programmeradmin2浏览0评论

soundmanager2 will use html5 audio instead of flash if various properties are set and it thinks conditions are Ok.

Once soundmanager2 has decided, is there a property on the SoundManager object that will tell me whether it went for html5 or flash?

(I know it mentions it in the debug log but I'm looking for a property I could query)

soundmanager2 will use html5 audio instead of flash if various properties are set and it thinks conditions are Ok.

Once soundmanager2 has decided, is there a property on the SoundManager object that will tell me whether it went for html5 or flash?

(I know it mentions it in the debug log but I'm looking for a property I could query)

Share Improve this question asked Apr 24, 2011 at 14:45 codeulikecodeulike 23.1k29 gold badges127 silver badges171 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

I don't think it's documented but the SMSound object has an isHTML5 property that you can check to see if a given sound is using HTML5 Audio.

The SoundManager object also has an html5 property that contains information about what audio formats are supported by the current browser.

set this on soundManager.setup()

soundManager.setup({
    useHTML5Audio: true,
    preferFlash: false
});

There are 2 ways:

  1. Check the version property of your SoundManager2 instance:

    > soundManager.version
    "V2.97a.20131201 (AS3/Flash 9)" // Flash version
    "V2.97a.20131201 (HTML5-only mode)" // HTML5 version
    
  2. Check boolean:

    > soundManager.html5.usingFlash
    
发布评论

评论列表(0)

  1. 暂无评论