VLC 將 Android 應用程式最佳化,在大螢幕上提供沉浸式影片體驗
透過集合功能整理內容
你可以依據偏好儲存及分類內容。

VLC 是由 VideoLAN 專案開發的免費開放原始碼跨平台多媒體播放器。VLC 的設計的核心是與所有檔案和螢幕完美的相容性。VLC 可以播放大多數的本機影片和音訊檔案與各種串流通訊協定,而許多第三方應用程式都使用 VLC 引擎處理影片。總結來說,VideoLAN 的開發人員希望使用者能夠隨時隨地播放各種內容,不受偏好的裝置或螢幕大小影響。
該團隊最初是為 Android 設計 VLC 應用程式,但使用者很快就開始在 Chromebook 上要求相同的體驗。此時,VideoLAN 可以採用將 VLC 納入 ChromeOS,藉此為使用者提供電腦版的服務。
VideoLAN 針對 ChromeOS 和大型螢幕為 Android 應用程式進行最佳化調整,從一開始就支援 x86 和 64 位元 ARM,確保 VLC 使用者在各種裝置和板型規格上都能獲得相同的沉浸式體驗。
具體措施
團隊首先要注意電腦版 VLC 使用者偏好哪些功能,例如滑鼠輸入、右鍵選單,並確認外部儲存空間 (即硬碟和 USB 隨身碟) 能正常運作。隨後,他們開始調整應用程式的版面配置和功能,確保使用者在類似電腦的環境中享受相同功能。
鍵盤和滑鼠支援
團隊最重要的最佳化項目之一,就是支援鍵盤和滑鼠輸入。支援鍵盤可讓使用者使用快速鍵和方向按鈕輕鬆瀏覽應用程式,而滑鼠輸入也可用於在 VLC 播放器上來回拖曳檔案。
動態調整大小
VideoLAN 設計了多個版本的版面配置,方便使用者輕鬆縮放應用程式及調整應用程式大小。由於該團隊已針對平板電腦設計 VLC 的版面配置,因此要整合更寬廣的版面配置並不容易,此外,他們也微調了播放器的音訊設定,以便利用大螢幕上可用的額外空間。
以往,團隊必須使用個別模擬器或不同的裝置測試各種版面配置。不過,在 ChromeOS 中支援 ChromeOS,該團隊可以在相同的裝置上同時測試電腦、平板電腦和行動裝置的 UI 版面配置,不必使用模擬器。這大幅縮短了設計和測試時間
現在有了 ChromeOS 的 Linux (Beta 版),開發人員可使用 Android Studio 原生建構及測試 Android 應用程式,讓 Chromebook 成為具備開發功能的裝置。
使用 Kotlin 編寫程式碼
最棒的是,該團隊使用 Kotlin 完成所有工作,而 Kotlin 是非常強大的程式設計語言,能夠以更安全、更精簡的程式碼編寫出提高工作效率。縮減應用程式的程式碼集後,他們得以減少解決問題的時間,並將更多時間用於最佳化應用程式的版面配置和功能。
VideoLAN 的 Android 開發人員主管 Geoffrey Métais 表示:「我們通常會不願意重組或重寫程式碼,因為這麼做可能會失去功能。「幸好,從 Java 轉換至 Kotlin 的過程相當順利,這一切都要歸功於 Android Studio 內建的遷移工具,而 Kotlin 的協同程式架構有助我們提升效能。」
成果
VideoLAN 針對行動裝置、ChromeOS 和 Android TV 使用相同的 APK,因此開發了主要開發人員兩個月才針對各個平台為應用程式進行最佳化調整。使用者數月以來一直在要求 ChromeOS 中提供 VLC 支援,尤其是在播放 DVD 時,團隊到目前為止都獲得相當正面的意見回饋。此外,最新版本的 ChromeOS 已完整支援外部儲存空間,因此所有 Android 使用者現在都能享有相同的好處。
「我們的團隊一直在尋找能為使用者帶來最大影響的新商機。」影片 LAN 總裁 Jean-Baptiste Kempf 表示。「針對 Chromebook 進行最佳化調整後,我們得以將應用程式延伸到大量裝置和板型規格上,而根據全球使用者的意見回饋,我們顯然能達到這個成績。」
立即開始
請參閱針對 ChromeOS 進行應用程式最佳化的最佳做法。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間: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"]],["上次更新時間: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)."]]