Skip to content

Example of Lock Screen 🔓 and Full Screen 📺 mod in ExoPlayer ▶️

Notifications You must be signed in to change notification settings

halilozel1903/ExoPlayerScreenLock

Repository files navigation

How to add Lock Screen 🔓 & Full Screen 📺 mod in ExoPlayer ▶️

ExoPlayer

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

ExoPlayer allows developers to create and use custom controllers. In the sample project we will do, we add icons for both full screen mode and screen locking.

Full Screen Mode 📺

Let's start with how we integrate Full Screen mode, which is one of the indispensable features in the streaming world, into our application. Netflix allows the user to watch directly in landscape mode. Some applications, for example TV+, allow the user to watch in both horizontal and vertical modes.

ExoPlayer

ExoPlayer

Screen Lock Mode 🔓

Another popular feature on Netflix recently is screen locking. The user can continue watching by locking the screen. When the screen is locked, it provides the opportunity to have pleasant moments by focusing directly on the relevant content without accessing the player. If the user wants to unlock the screen, he activates all the elements on the player screen by pressing the Lock icon.

Donation 💸

Do you want to support me? ☕

"Buy Me A Coffee"

License ℹ️

MIT License

Copyright (c) 2023 Halil OZEL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.