VLC 对其 Android 应用进行优化以在大屏设备上打造沉浸式视频体验
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。

VLC 是由 VideoLAN 项目开发的一款免费开源跨平台多媒体播放器。
与所有文件和屏幕的无缝兼容是 VLC 的设计核心。VLC 能够播放大多数本地视频和音频文件并支持各种流式传输协议,有很多第三方应用使用 VLC 引擎来处理视频播放。总而言之,VideoLAN 的开发者希望用户可以随时随地播放所有内容,无论他们倾向于何种设备或屏幕尺寸。
该团队最初设计了适用于 Android 的 VLC 应用,不久后用户就开始要求在 Chromebook 上提供相同的体验。这时,VideoLAN 发现了机会,通过将 VLC 引入 ChromeOS,为用户提供桌面设备式的体验。
通过针对 ChromeOS 和更大屏幕优化 Android 应用,并从一开始就支持 x86 和 64 位 ARM,VideoLAN 确保 VLC 用户可以在各种不同的设备和外形规格上获得相同的沉浸式体验。
策略
该团队首先关注的是 VLC 用户青睐的桌面设备功能,例如鼠标输入、右键菜单,同时确保外部存储空间(即硬盘和 USB 存储器)正常运作。然后,他们开始调整应用的布局和功能,以确保用户可以在类似桌面设备的环境中享受同样的功能。
键盘和鼠标支持
该团队最重要的优化功能之一是支持键盘和鼠标输入。支持键盘使用户能够使用快捷键和方向键轻松浏览应用,而支持鼠标输入则可以启用右键点击命令,并可以将文件拖放到 VLC 播放器或从中拖出。
动态调整大小
VideoLAN 设计了多种布局版本,可让用户轻松扩缩和调整应用大小。由于该团队已为平板电脑设计了 VLC 的布局,因此使其适应更大、更宽的布局是一个相当简单的过程。他们还调整了播放器的音频设置,以利用更大屏幕的额外空间。
此前,该团队需要使用单独的模拟器或单独的设备来测试每个布局。不过,得益于 Android 对 ChromeOS 的支持,该团队无需使用模拟器,即可在同一设备上一次性测试桌面设备、平板电脑和移动设备的界面布局。这大大缩短了设计和测试时间。
现在,借助 ChromeOS 上的 Linux(Beta 版),开发者可以使用 Android Studio 以原生方式构建和测试 Android 应用,从而使 Chromebook 成为适合开发的设备。
用 Kotlin 编写代码
最重要的是,该团队使用 Kotlin 完成了所有工作,Kotlin 是一种功能强大的编程语言,可通过编写更安全、更简洁的代码来帮助他们提高生产力。通过减少应用的代码库,开发者不仅可节省排查问题所需的时间,而且可将更多时间用于优化应用的布局和功能。
“我们通常不愿大范围调整代码结构或重写代码,因为这会带来功能丢失的风险,”VideoLAN 的 Android 首席开发者 Geoffrey Métais 说,“借助 Android Studio 的内置迁移工具,从 Java 转换到 Kotlin 的过程非常顺利,这使我们感到十分高兴,而 Kotlin 的协程框架帮助我们提高了性能。”
成果
VideoLAN 针对移动设备、ChromeOS 和 Android TV 使用了相同的 APK,因此该首席开发者仅花了两个月就针对每个平台优化了应用。数月来,用户一直要求 ChromeOS 支持 VLC,尤其是针对 DVD 播放。到目前为止,该团队收到的绝大多数反馈都很高。此外,最新版本的 ChromeOS 完全支持外部存储空间,因此每位 Android 用户现在都能获享同样的好处。
“我们的团队一直在寻找新机会,以便为用户带来最佳影响力,”VideoLAN 总裁 Jean-Baptiste Kempf 说,“针对 Chromebook 进行优化有助于我们将应用范围扩展到大量设备和设备类型上,并且根据世界各地用户的反馈,很显然,我们已成功达成这一目标。”
开始使用
查看针对 ChromeOS 优化应用的一些最佳做法。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# VLC optimizes its Android app for immersive video experiences on larger screens\n\n[VLC](https://www.videolan.org/vlc/index.html) is a free, open\nsource cross-platform multimedia player developed by the [VideoLAN project.](https://www.videolan.org/)\nSeamless compatibility with all files and screens is at the core of VLC's\ndesign. VLC is able to play most local video and audio files as well as various\nstreaming protocols, and a large number of third-party apps use the VLC engine\nto handle video playback. Ultimately, VideoLAN's developers want users to be\nable to play everything, everywhere --- no matter what device or screen size they\nprefer.\n\nThe team originally designed the [VLC app](https://play.google.com/store/apps/details?id=org.videolan.vlc)\nfor Android, and it wasn't long before users started requesting the same\nexperience on Chromebooks. That's when VideoLAN saw an opportunity to offer\nusers a desktop-style experience by bringing VLC to ChromeOS.\n\nBy optimizing the Android app for ChromeOS and larger screens --- as well as\nsupporting x86 and 64-bit ARM from the start --- VideoLAN ensured VLC users could\nenjoy the same immersive experience across a range of different devices and\nform factors.\n\nWhat they did\n-------------\n\nThe team started by noting which features VLC users preferred on desktop,\nsuch as mouse input, right-click menus, and making sure external storage\n(i.e., hard drives and USB thumb drives) worked just right. From there,\nthey started adjusting the app's layout and functionality to ensure users\ncould enjoy those same features in a desktop-like environment.\n\n### Keyboard and mouse support\n\nOne of the team's most important optimizations was to support keyboard and mouse\ninput. Supporting keyboards allowed people to use shortcuts and direction buttons\nto easily navigate the app, while mouse input enabled right-click commands and\nfile drag-and-drop to and from the VLC player.\n\n### Dynamic resizing\n\nVideoLAN designed multiple versions of the layout to allow users to easily\nscale and resize the app. Because the team had already designed VLC's layout\nfor tablets, accommodating larger, wider layouts was a fairly simple process.\nThey also tweaked the player's audio settings to take advantage of the extra\nreal estate available on larger screens.\n\nPreviously, the team needed to use individual emulators or separate devices to\ntest each layout. But, with Android support for ChromeOS, the team was able to\ntest UI layout for desktop, tablet, and mobile all at once, on the same device,\nand without having to use an emulator. This substantially sped up the design\nand test times.\n\nAnd now with [Linux (Beta) on ChromeOS](https://cros.page.link/linux-dev),\ndevelopers can use Android Studio to build and test Android apps natively,\nmaking Chromebooks development-ready devices. \n\n### Writing code in Kotlin\n\nBest of all, the team did all the work in [Kotlin](/kotlin),\na powerful programming language that helped them improve productivity by writing\nin safer and more concise code. By reducing the app's codebase, they were able\nto spend less time troubleshooting issues and more time optimizing the app's\nlayout and functionality.\n\n\"We're usually reluctant to majorly restructure or rewrite our code because we\nrisk losing functionality,\" said Geoffrey Métais, VideoLAN's lead Android\ndeveloper. \"We were pleased to find the transition from Java to Kotlin was\nreally smooth, thanks to Android Studio's built-in migration tool, and Kotlin's\n[couroutines framework](/kotlin/coroutines) helped us improve performance.\"\n\nResults\n-------\n\nVideoLAN used the same APK for mobile, ChromeOS, and Android TV, so it only\ntook the lead developer two months to optimize the app for each platform.\nUsers had been asking for VLC support on ChromeOS for months, especially for\nDVD playback, and the team has received overwhelmingly positive feedback so far.\nPlus, the latest version of ChromeOS fully supports external storage, so every\nAndroid user now enjoys the same benefit.\n\n\"Our team is always on the lookout for new opportunities to drive the biggest\nimpact for our users,\" said VideoLAN President Jean-Baptiste Kempf. \"Optimizing\nfor Chromebooks has helped us extend our app across a huge number of devices\nand form factors, and it's clear we hit the mark based on feedback from users\naround the world.\"\n\nGet Started\n-----------\n\nCheck out some best practices to [optimize your apps for ChromeOS](/topic/arc/optimizing)."]]