Captive Portal Customizations - YouTube Player
From Social ID Developers
(Difference between revisions)
(Created page with "== Description == YouTube video player configuration. See also: * [https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player YouTube Player API Refe...") |
(→Description) |
||
Line 2: | Line 2: | ||
YouTube video player configuration. | YouTube video player configuration. | ||
+ | |||
+ | It's recommended to customize the player in the Layout configuration to make sure they it is applied to all videos. | ||
See also: | See also: |
Latest revision as of 20:21, 27 October 2017
Description
YouTube video player configuration.
It's recommended to customize the player in the Layout configuration to make sure they it is applied to all videos.
See also:
- YouTube Player API Reference for iframe Embeds - Loading a video player
- YouTube Embedded Players and Player Parameters - Supported parameters
Default Values
youtubePlayerOptions: { videoId1: [dynamic], height2: '390', width2: '640', playerVars: { playsinline: 0, rel: 0, showinfo: 0 } }
1 videoId cannot be set.
2 height and width are actually overridden by CSS classes.
Customization Example
<script> appConfig.customization = appConfig.customization || {}; appConfig.customization.youtubePlayerOptions = { playerVars: { controls: 0, modestbranding: 1, hl: 'pt' }, events: { onStateChange: function(event) { if (event.data == 0) { // video ended alert('Thank you for watching!'); } } } }; </script>