Flac support #148

Closed
stouchardIpso opened this Issue Jan 19, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@stouchardIpso

Hi,
With the release of https://9to5google.com/2017/01/12/chrome-56-flac-playback/, do you think it will be soon possible to read flac audio with SoundManager on Chrome 56 ?

Thank you !

@stouchardIpso

This comment has been minimized.

Show comment
Hide comment

🆙

@scottschiller

This comment has been minimized.

Show comment
Hide comment
@scottschiller

scottschiller Jan 29, 2017

Owner

Hello! Yes; SM2 wraps whatever native support HTML5 has for formats; this can also be affected by what's installed on the host OS - plugins and the like - to some extent.

I can update SM2 to check specifically for FLAC as a known format, but you should also be able to just "go for it" and tell SM2 to play a file regardless. In this case it can be helpful to provide the correct MIME type for FLAC, I'll explain that in a moment.

e.g.,

soundManager.createSound({
  url: '/path/to/some.flac',
  type: 'audio/flac'
});

Note that in this case, present SM2 releases won't know if the browser has support or not, it won't have tested that MIME type yet - but, that's OK; because you provide type: 'audio/flac', SM2 will pass that to the HTML5 audio API's canPlayType() and provided the API returns a "probably" or "maybe" (yes, that's how they designed it 😆 ), SM2 will go ahead and try to play the file.

I'm assuming audio/flac is the correct MIME type, or at least good enough to get an "OK" response at present. Will follow up if not.

I'll have the next release of SM2 also add audio/flac to the formats it checks for.

Owner

scottschiller commented Jan 29, 2017

Hello! Yes; SM2 wraps whatever native support HTML5 has for formats; this can also be affected by what's installed on the host OS - plugins and the like - to some extent.

I can update SM2 to check specifically for FLAC as a known format, but you should also be able to just "go for it" and tell SM2 to play a file regardless. In this case it can be helpful to provide the correct MIME type for FLAC, I'll explain that in a moment.

e.g.,

soundManager.createSound({
  url: '/path/to/some.flac',
  type: 'audio/flac'
});

Note that in this case, present SM2 releases won't know if the browser has support or not, it won't have tested that MIME type yet - but, that's OK; because you provide type: 'audio/flac', SM2 will pass that to the HTML5 audio API's canPlayType() and provided the API returns a "probably" or "maybe" (yes, that's how they designed it 😆 ), SM2 will go ahead and try to play the file.

I'm assuming audio/flac is the correct MIME type, or at least good enough to get an "OK" response at present. Will follow up if not.

I'll have the next release of SM2 also add audio/flac to the formats it checks for.

@Rello Rello referenced this issue in Rello/audioplayer Feb 22, 2017

Closed

FLAC Support #45

@scottschiller

This comment has been minimized.

Show comment
Hide comment
@scottschiller

scottschiller Jun 4, 2017

Owner

This has been merged in and pushed live, now with V2.97a.20170601. The SM2 homepage now tests and shows FLAC when you visit it; thanks for the reminder.
www.schillmania.com/projects/soundmanager2

Owner

scottschiller commented Jun 4, 2017

This has been merged in and pushed live, now with V2.97a.20170601. The SM2 homepage now tests and shows FLAC when you visit it; thanks for the reminder.
www.schillmania.com/projects/soundmanager2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment