Skip to main content
JW Player is a video platform for hosting and playing video. Median’s JW Player plugin integrates the JW Player iOS SDK and Android SDK into your app to provide native video playback with support for single videos, playlists, and adaptive streaming.

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 (licenseKey is a required configuration field).
  • Access to App Studio to configure the plugin in the Native Plugins section.

Implementation guide

App configuration

  1. Open App Studio and navigate to the Native Plugins section.
  2. Locate the JW Player plugin and enable it.
  3. Enter your JW Player Android and iOS License Keys.
  4. If you want to enable Chromecast on iOS, enter your Google Cast App ID in the appId field.
  5. Save your configuration.
JW Player plugin settings in App Studio with fields for the Android and iOS license keys and the Google Cast App ID

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:
Android returns when the player is closed, including playback state:
Error response

Chromecast support (iOS)

On iOS, Chromecast support is automatically initialized at app launch when the appId 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.
Last modified on December 3, 2026