Casting

Casting enables a viewer to use Google Cast or Apple AirPlay technologies to stream video and audio content to a compatible TV or sound system. By enabling the casting feature for a player, a viewer can tap an icon in the control bar to stream your content on a cast-compatible device. If no compatible device is detected by the player, no cast icon appears.

See also: FAQs

To enable casting, add an empty cast object in your setup.

jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/1a2Bc3d4",
    "height": 360,
    "width": 640,
    "cast": {}
});

If you are using a custom receiver, assign the identifier of the custom receiver to the cast.appid property.

jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/1a2Bc3d4",
    "height": 360,
    "width": 640,
    "cast": {
        "appid": "XXXXXX",
        "interceptCast": true
    }
});
Property Description
appid string When using a custom receiver, the identifier of the receiver app
interceptCast boolean Disables the default Chromecast behavior

Clicking the casting icon will no longer work. The player will trigger a castIntercepted event.

πŸ“˜

When this configuration is set, users must call either requestCast to start casting or stopCasting to stop casting content.

© 2007- Longtail Ad Solutions, Inc.