mod: 还原音轨加载方式(某些资源无声)

This commit is contained in:
guozhigq
2023-09-07 22:56:52 +08:00
parent 0ad54d8c0b
commit 8c02a566f6

View File

@ -353,14 +353,14 @@ class PlPlayerController {
var pp = player.platform as NativePlayer; var pp = player.platform as NativePlayer;
// 音轨 // 音轨
// if (dataSource.audioSource != '' && dataSource.audioSource != null) { if (dataSource.audioSource != '' && dataSource.audioSource != null) {
// await pp.setProperty( await pp.setProperty(
// 'audio-files', 'audio-files',
// UniversalPlatform.isWindows UniversalPlatform.isWindows
// ? dataSource.audioSource!.replaceAll(';', '\\;') ? dataSource.audioSource!.replaceAll(';', '\\;')
// : dataSource.audioSource!.replaceAll(':', '\\:'), : dataSource.audioSource!.replaceAll(':', '\\:'),
// ); );
// } }
// 字幕 // 字幕
if (dataSource.subFiles != '' && dataSource.subFiles != null) { if (dataSource.subFiles != '' && dataSource.subFiles != null) {
@ -399,9 +399,9 @@ class PlPlayerController {
play: false, play: false,
); );
// 音轨 // 音轨
player.setAudioTrack( // player.setAudioTrack(
AudioTrack.uri(dataSource.audioSource!), // AudioTrack.uri(dataSource.audioSource!),
); // );
return player; return player;
} }