GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jwplayer/jwplayer-android-best-practice-apps

BranchesTags
Open more actions menu

Latest commit

 

History

373 Commits
373 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
AdvancedPlayerDemo
AdvancedPlayerDemo
 
 
BackgroundAudioDemo
BackgroundAudioDemo
 
 
CaptionsDemo
CaptionsDemo
 
 
ChromecastDemo
ChromecastDemo
 
 
CustomFragmentUi
CustomFragmentUi
 
 
CustomUi
CustomUi
 
 
DrmDemo
DrmDemo
 
 
FullscreenWithoutRotationDemo
FullscreenWithoutRotationDemo
 
 
GoogleDAIDemo
GoogleDAIDemo
 
 
ImaAdCompanions
ImaAdCompanions
 
 
JWCompose
JWCompose
 
 
LocalAssetPlayback
LocalAssetPlayback
 
 
OfflineDelegateDemo
OfflineDelegateDemo
 
 
OfflineDownloadsDemo
OfflineDownloadsDemo
 
 
PipDemo
PipDemo
 
 
RecyclerViewDemo
RecyclerViewDemo
 
 
StylingDemo
StylingDemo
 
 
VerticalFeedDemo
VerticalFeedDemo
 
 
notifications-demo
notifications-demo
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
buildAll.sh
buildAll.sh
 
 

Repository files navigation

JW Player SDK for Android - Best Practice Apps

In this repository you will find several tech demos that use the JW Player SDK for Android

Refer to the README in each subdirectory for specific usage instructions.

Sample Apps

Getting started

  • FullscreenWithoutRotationDemo - A JWPlayerView with a custom FullscreenHandler that goes fullscreen without rotating the screen
  • LocalAssetPlayback - Plays video, poster and captions bundled in the app's assets folder
  • JWCompose - The player inside Jetpack Compose (AndroidView), kept across recomposition and configuration changes

Player UI

  • AdvancedPlayerDemo - Custom native controls (play/pause, seek, playback rate, quality, ad badge and skip) with the SDK UI turned off, plus a VAST pre-roll and mid-roll schedule
  • CustomUi - Replacing one of the SDK's UI groups (Next Up) with your own Kotlin view, using the SDK's UI view models
  • CustomFragmentUi - A custom player view hosted in a Fragment, with a small event log
  • StylingDemo - Restyling the player's controls by overriding the SDK's resources (colors, dimensions, styles)

Ads

  • ImaAdCompanions - Google IMA ads with companion ad slots
  • GoogleDAIDemo - Google IMA Dynamic Ad Insertion (DAI) for video on demand
  • (VAST schedules are shown in AdvancedPlayerDemo)

Playback features

  • CaptionsDemo - Sideloaded and in-manifest captions, caption styling and position (CaptionsConfig, CaptionPosition) and a track picker
  • PipDemo - Picture-in-picture: entering from a button or on Home, the PiP events and warnings, and pausing when the PiP window is closed
  • VerticalFeedDemo - A full-screen vertical video feed (swipe up / down, one video per page) built on ViewPager2 with a fixed pool of three players; the README explains the limits of running several players at once
  • RecyclerViewDemo - Several players in a RecyclerView: one plays at a time, players are reused with the views, and fullscreen moves the player out of its cell
  • ChromecastDemo - Casting with the JW Player Chromecast module

Background audio

  • BackgroundAudioDemo - Background audio with the SDK's own media session, notification and lock-screen controls, custom notification buttons and the optional SDK audio-focus handling (SDK 4.28.0+). The recommended way to add background audio
  • notifications-demo - Background audio with an app-owned media session and Notification, for apps that need full control of them

DRM and offline

  • DrmDemo - Online Widevine DRM with a licence URL (DrmConfig), or a custom MediaDrmCallback
  • OfflineDownloadsDemo - Offline downloads, including DRM, managed by the SDK (OfflineDownloadManager). The recommended way to add offline playback
  • OfflineDelegateDemo - Offline downloads, including DRM, through the app's own Media3 download service and the SDK's OfflineDelegate hook

Usage instructions

In general the following usage instructions apply to most sample projects:

  • Clone this repository
  • Start up Android Studio choose Open an Existing Android Studio Project
  • Navigate to the location of the repository and select the root directory of the app you want to load.
  • Click OK
  • Give the app your license key (use one option below). BuildConfig.JWPLAYER_LICENSE_KEY is generated at build time, so it cannot be changed from code.
    • set the JWPLAYER_LICENSE_KEY environment variable before building (Android Studio must be started from a shell that has it, or set it in your Gradle run configuration)
    • put your key in the app's app/build.gradle (app/build.gradle.kts in CustomUi)
    • pass your key directly to LicenseUtil().setLicenseKey(context, "<your license key>") in the app's Activity
  • OfflineDownloadsDemo also needs a JW Platform v1 API secret, read from the JWPLAYER_V1_API_SECRET environment variable (see its README)
  • Click Run

For more information about the JW Player SDK for Android, and how to use it, head over to our Developer Portal

Building all samples

./buildAll.sh builds every sample (each folder with its own settings.gradle or settings.gradle.kts) with assembleDebug; pass another Gradle task to change that, e.g. ./buildAll.sh assembleRelease.

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

48 stars

Watchers

14 watching

Forks

36 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.