Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

seedds/VPlayer

Repository files navigation

VPlayer

VPlayer is an Android-first app that does two things:

  • hosts a local HTTP server so you can upload files from a browser on the same Wi-Fi
  • plays local video files on the device

Features

  • Local HTTP upload server running on the phone.
  • Browser-based uploads from another device on the same Wi-Fi network.
  • Local video playback on the device.
  • Automatic landscape playback for videos.
  • Portrait library screens on phones, with landscape playback only while a video is open.
  • Background playback gestures in the player:
    • single tap to show or hide controls
    • one-finger double tap to play or pause
    • two-finger double tap to lock or unlock the player controls
  • Locked player mode that hides the control chrome except the lock button.
  • Continuous scrub preview popup above the seek bar while seeking.

Local development

npm install
npx expo start

Because the project uses a native HTTP server module, use a custom development build instead of Expo Go.

Android APK builds

npm install -g eas-cli
eas login
eas build:configure
eas build -p android --profile preview
  • development: installable dev client APK
  • preview: installable APK for testers
  • production: Play Store AAB

Local Gradle build

Local and GitHub release builds use the same metadata source:

  • versionName defaults to the next patch release for the major.minor line in app.json
  • versionCode defaults to 1000000 + git rev-list --count HEAD

That keeps local builds and the GitHub release workflow in sync for the same commit.

If app.json has 1.0.2 and the latest release tag is v1.0.2-build.1000101, the next computed release version will be 1.0.3.

Build a local release APK from the Android project:

cd android
./gradlew assembleRelease

Output file:

  • android/app/build/outputs/apk/release/vplayer-<versionName>.apk

Build an ARM64-only APK:

cd android
./gradlew assembleRelease -PreactNativeArchitectures=arm64-v8a

To let a local APK upgrade the GitHub release APK already installed on your device, build with the same release keystore used by the workflow:

export VPLAYER_RELEASE_STORE_FILE=/absolute/path/to/vplayer-release.keystore
export VPLAYER_RELEASE_STORE_PASSWORD=...
export VPLAYER_RELEASE_KEY_ALIAS=...
export VPLAYER_RELEASE_KEY_PASSWORD=...
cd android
./gradlew assembleRelease -PreactNativeArchitectures=arm64-v8a

Without those signing values, local assembleRelease falls back to the debug keystore, and Android will not install it over a release-signed GitHub build.

If you need to override the computed version for a one-off build, pass the same properties the workflow understands:

cd android
./gradlew assembleRelease \
 -PVPLAYER_VERSION_NAME=1.0.2 \
 -PVPLAYER_VERSION_CODE=123 \
 -PreactNativeArchitectures=arm64-v8a

Before running Gradle locally, make sure Android SDK and JDK 17 are configured. You can either set ANDROID_HOME / ANDROID_SDK_ROOT, or create android/local.properties with:

sdk.dir=/Users/<your-user>/Library/Android/sdk

App flow

  1. Launch the app on an Android phone.
  2. Open the Upload tab and note the local URL.
  3. Visit that URL from a browser on the same Wi-Fi network and upload a video.
  4. Open Library and play the uploaded file.

Player controls

  • Back: leave the player and save playback progress.
  • Next: jump to the next video in the queue when available.
  • -10 / +10: seek backward or forward by ten seconds.
  • Scrub the progress bar to preview frames in a popup before releasing.
  • Tap the center lock button to hide the rest of the controls.
  • When the device sleeps and wakes again, playback stays paused and the player returns to unlocked mode.

Notes

  • Current work is focused on Android first.
  • iOS local network permissions and packaging can be added later.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /