Skip to content

Desktop无法正常播放 #15

@suzhelan

Description

@suzhelan

已经实现的措施
添加依赖 依赖和VLC二进制文件

       {
            implementation(mediampLibs.mediamp.api)
        }

        sourceSets.androidMain.dependencies {
            implementation(mediampLibs.mediamp.exoplayer)
            implementation(libs.androidx.media3.exoplayer)
        }
        desktopMain.dependencies {
            implementation(mediampLibs.mediamp.vlc)
        }

添加appResources

compose.desktop {
    application {
        mainClass = "top.sacz.bili.MainKt"

        nativeDistributions {

            appResourcesRootDir.set(file("appResources"))

            targetFormats(TargetFormat.Dmg, TargetFormat.Exe, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "BiliCompose"
            packageVersion = "1.0.0"
            description = "description"
            copyright = "© 2025 suzhelan. All rights reserved."
            vendor = "Suzhelan"
//            licenseFile.set(project.file("LICENSE.txt"))
            windows {
                shortcut = true
                perUserInstall = true
                iconFile.set(project.file("icons/icon.ico"))
                //设置编译结果路径
                outputBaseDir.set(project.file("windows"))
            }
        }
    }
}

发生的异常和场景
1.任何情况下都无法播放 控制台提示 vlcj player error
2.在使用示例视频 http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
并且在本机已经安装VLC的情况下可以正常播放
3.在使用示例视频 http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
使用createDistributable打包时运行时,可以正常播放视频音频和获取媒体信息 ,但没有画面 如下图

Image

如果按照预期 那么他应该会这样显示

Image

如果出现vlcj player error 那么他会这样显示

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions