3

iPhone 5 で soundmanager 2 をテストしようとしましたが、プレーヤーでファイルを再生できませんでした。デバッグ出力には次のように表示されます。

mySound: suspend
mySound: loadstart
mySound: waiting
soundManager.load(): current URL already assigned.
mySound: load (rain.mp3)
mySound: play(): Loading - attempting to play...
mySound: play(): Already playing (multi-shot)
soundManager.load(): current URL already assigned.
mySound: load (rain.mp3)
mySound: Ignoring request to load again
soundManager.load(): current URL already assigned.
mySound: load (rain.mp3)
mySound: play(): Loading - attempting to play...
soundManager.load(): current URL already assigned.
mySound: load (rain.mp3)
soundManager.load(): current URL already assigned.
mySound: load (rain.mp3)
mySound: load (rain.mp3)
mySound: load (rain.mp3)
mySound: Using HTML5
mySound: Merged options:
soundManager.createSound(): mySound (rain.mp3)
SoundManager 2: Ready.
SoundManager 2 HTML5 support: mp3 = true, mp4 = true, ogg = true, opus = true, wav = true
SoundManager 2: Using singleton HTML5 Audio() pattern for this device.
SoundManager V2.97a.20130512 (HTML5-only mode)

非常に単純なテスト ページがあります。

<html>
<head>
<title>
</title>
<script type="text/javascript" src="assets/js/controls/soundmanager2.js?<?php echo time(); ?>"></script>

<script>
soundManager.setup({
    url: '/path/to/swf-files/',
    flashVersion: 9, // optional: shiny features (default = 8)
    // optional: ignore Flash where possible, use 100% HTML5 mode
    preferFlash: false,
    onready: function() {
    // Ready to use; soundManager.createSound() etc. can now be called.


    soundManager.createSound({
        id: 'mySound',
        url: 'rain.mp3',
        autoLoad: true,
        autoPlay: true,
        onload: function() {
            alert('The sound '+this.id+' loaded!');
        },
        volume: 50
        });
    }
});
</script>
</head>
<body></body>
</html>

彼らのデモ サイトは実際には iPhone で動作しますが、動作させるために何かが異なって設定されていることは明らかです。

ありがとう。

4

0 に答える 0