Why use JW Player?
- Native SDK playback: The plugin uses JW Player’s native iOS and Android SDKs for video playback.
- Flexible input formats: Play a single video file, an array of video files as a playlist, or load a playlist directly from a JW Player playlist URL.
- Cross-platform support: One Median JavaScript Bridge API works across iOS and Android with platform-appropriate behavior.
- Chromecast on iOS: When you configure an App ID, Chromecast initializes automatically at app launch on iOS.
Prerequisites
Before you begin, ensure you have the following:- A Median app with the JavaScript Bridge enabled.
- A valid JW Player license key (
licenseKeyis a required configuration field). - Access to App Studio to configure the plugin in the Native Plugins section.
Implementation guide
App configuration
- Open App Studio and navigate to the Native Plugins section.
- Locate the JW Player plugin and enable it.
- Enter your JW Player Android and iOS License Keys.
- If you want to enable Chromecast on iOS, enter your Google Cast App ID in the
appIdfield. - Save your configuration.

JW Player plugin configuration
Plugin configuration options
Rebuild after configurationPlugin settings take effect only in new builds. After changing credentials or uploading new Firebase configuration files, rebuild your app and test on a real device or simulator before releasing.
JavaScript Bridge functions
Initialize the JW Player SDK
Auto-initializationOn iOS and Android, the JW Player plugin auto-initializes at runtime using the license key uploaded in the app configuration. Alternatively, you can manually initialize the SDK using the
median.jwplayer.initialize() command.Parameters
Play a video
Present a full-screen native player and begin video playback. You can provide a single video file, an array of video files (playlist), or a JW Player playlist URL. To play a video:Optional parameters
At least one of
file, files, or playlistUrl must be provided.
Return values
The callback data differs between platforms: iOS returns when the player has been configured:Error response
Chromecast support (iOS)
On iOS, Chromecast support is automatically initialized at app launch when theappId is configured in the server configuration. No additional JavaScript calls are required.
To enable Chromecast, add your Google Cast application ID to the JW Player configuration in App Studio as shown in App configuration.
Testing checklist
Use this checklist to ensure JW Player is working correctly in your iOS or Android app:-
The SDK auto-initializes or manually initializes using
median.jwplayer.initialize() -
Using
median.jwplayer.play()launches the player - Chromecast works using an iOS appID or Android Google Cast application ID.
Troubleshooting
JW Player JavaScript Bridge functions do nothing or throw errors
Ensure the JavaScript Bridge is enabled in App Studio. Manually initialize the SDK or enter license keys in the plugin configuration in App Studio.initialize() returns NOT_INITIALIZED or INTERNAL_ERROR
Check that the licenseKey value in your plugin configuration is valid and matches the key from JW Player.