@@ -62,8 +62,6 @@ function LoadItems_VideoPlayer(id as string, mediaSourceId = invalid as dynamic,
62
62
return invalid
63
63
end if
64
64
65
- print "video=" , video
66
- print "video.content=" , video .content
67
65
return video
68
66
end function
69
67
@@ -143,13 +141,6 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s
143
141
144
142
145
143
' 'TODO: allow user selection of subtitle track before playback initiated, for now set to no subtitles
146
- print "m.playbackInfo.MediaSources[0]" , m .playbackInfo .MediaSources [0 ]
147
- print "m.playbackInfo.MediaSources[0].Formats" , m .playbackInfo .MediaSources [0 ].Formats
148
- print "m.playbackInfo.MediaSources[0].MediaStreams" , m .playbackInfo .MediaSources [0 ].MediaStreams
149
- for each stream in m .playbackInfo .MediaSources [0 ].MediaStreams
150
- print "stream=" , stream
151
- end for
152
- print "video.audioIndex=" , video .audioIndex
153
144
video .directPlaySupported = m .playbackInfo .MediaSources [0 ].SupportsDirectPlay
154
145
fully_external = false
155
146
@@ -219,36 +210,6 @@ sub addVideoContentURL(video, mediaSourceId, audio_stream_idx, fully_external)
219
210
"AudioStreamIndex" : audio_stream_idx
220
211
}
221
212
222
- selectedAudioStream = m .playbackInfo .MediaSources [0 ].MediaStreams [audio_stream_idx ]
223
- if selectedAudioStream .Channels > 2 and Lcase (selectedAudioStream .Codec ) = "aac" or Lcase (selectedAudioStream .Codec ) = "opus"
224
- ' does the user have an HDMI device attached that can decode this multichannel audio stream?
225
- di = CreateObject ("roDeviceInfo " )
226
- if not di .CanDecodeAudio ({ Codec : selectedAudioStream .Codec , ChCnt : selectedAudioStream .Channels , PassThru : 1 }).Result
227
- print "Attached HDMI device can not decode the selected multichannel audio codec"
228
- ' check to see if the attached HDMI device can decode our preferred audio codec
229
- preferredAudioCodec = m .global .session .user .playback .preferredAudioCodec
230
-
231
- if di .CanDecodeAudio ({ Codec : preferredAudioCodec , Container : selectedAudioStream .Container , ChCnt : selectedAudioStream .Channels , PassThru : 1 }).Result
232
- print "Attached HDMI device can decode our preferred multichannel audio codec"
233
- print "Attempting to transcode audio to the users preferred multichannel audio codec"
234
- ' transcode the audio to keep multichannel support
235
- ' otherwise the roku device will downmix aac/opus to stereo
236
- params .Static = false
237
- params .context = "Streaming"
238
- params .audioCodec = preferredAudioCodec
239
- ' force all multichannel aac files to use mkv container
240
- if selectedAudioStream .Codec = "aac"
241
- params .container = "mkv"
242
- end if
243
-
244
- video .isTranscoded = true
245
- video .directplaysupported = false
246
- params .transcodeReasons = "Switching audio codecs to preserve multichannel audio support"
247
- video .transcodeReasons = params .transcodeReasons
248
- end if
249
- end if
250
- end if
251
-
252
213
if mediaSourceId <> ""
253
214
params .MediaSourceId = mediaSourceId
254
215
end if
0 commit comments