File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,13 @@ class ApplicationController < ActionController::Base
44
44
def need_transcode? ( song )
45
45
song_format = song . format
46
46
47
- return true unless song_format . in? ( Stream ::WEB_SUPPORTED_FORMATS )
48
- return true if browser . safari? && !song_format . in? ( Stream ::SAFARI_SUPPORTED_FORMATS )
47
+ unless native_app?
48
+ return true if !browser . safari? && !song_format . in? ( Stream ::WEB_SUPPORTED_FORMATS )
49
+ # Non-Safari browsers don't support ALAC format. So we need to transcode it.
50
+ return true if !browser . safari? && song_format == "m4a" && song . lossless?
51
+ return true if browser . safari? && !song_format . in? ( Stream ::SAFARI_SUPPORTED_FORMATS )
52
+ end
53
+
49
54
return true if ios_app? && !song_format . in? ( Stream ::IOS_SUPPORTED_FORMATS )
50
55
return true if android_app? && !song_format . in? ( Stream ::ANDROID_SUPPORTED_FORMATS )
51
56
You can’t perform that action at this time.
0 commit comments