Frage

Here is a weird one,

Soundmanager simply wont play MP4 when using PHP output.

soundManager.createSound({
    id: 'sm2-1001',

    url: 'http://mysite.tld/1333092566.mp3', // WORKS
//  url: [{type: 'audio/mp3', url: 'http://mysite.tld/outputmp3.php}], // WORKS
//  url: 'http://mysite.tld/1333092566.mp4', // WORKS
//  url: [{type: 'audio/mp4', url: 'http://mysite.tld/outputmp4.php}], // DOES NOT WORK

    autoLoad: false,
    autoPlay: true,
});

URLs are correct, going to http://mysite.tld/outputmp4.php from the browser - opens and plays just fine.

Using smartReadFile.php https://jplayer.googlegroups.com/attach/f308294ddea52f6c/smartReadFile.php?view=1&part=4

Using latest version of SM2

Debug information from SM2:

soundManager.createSound(): sm2-1001 (http://mysite.tld/outputmp4.php)
soundmanager2.js (line 1110)
SMSound() merged options: { id: sm2-1001, url: http://mysite.tld/outputmp4.php, autoLoad: false, autoPlay: true, loops: 1, multiShot: true, multiShotEvents: false, pan: 0, stream: true, usePolicyFile: false, volume: 100, usePeakData: false, useWaveformData: false, useEQData: false, bufferTime: 3 }
soundmanager2.js (line 1112)
SMSound.play(): "sm2-1001" is loading - attempting to play..
soundmanager2.js (line 1110)
SMSound.play(): "sm2-1001" is starting to play
soundmanager2.js (line 1112)
SMSound._onload(): "sm2-1001" loaded.
soundmanager2.js (line 1110)
(Flash): correcting sound sm2-1001 end position (0) to length: 4602

Any ideas? Please help. Thanks.

War es hilfreich?

Lösung 2

Forcing this option to TRUE solved the case.

 'isMovieStar': null,      // "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL

Also this option must be applied since isMovieStar is supported starting from Flash9.

soundManager.flashVersion = 9; 

Andere Tipps

audio/mp4 is not a correct mimetype because mp4 is (designed for) video. Try using video/mp4, or just audio/mpeg.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top