You are here

brightcove-player-fixed.html.twig in Brightcove Video Connect 3.x

Same filename and directory in other branches
  1. 8.2 templates/brightcove-player-fixed.html.twig

brightcove-video-player.html.twig Default theme implementation to display Brightcove video player.

This template is used when dispalying the Brightcove video player.

Available variables:

  • account (string): Account ID.
  • data_usage (string): Module version indicator.
  • embed (string): Parent/child relationship, where parent is always default, and child players has the ID of the parent player.
  • height (int): Height of the player.
  • id (int): ID of the Brightcove video or playlist.
  • is_playlist (bool): Indicates whether it is a playlist player or a single video player.
  • player (string): Player ID.
  • type (string): The type of the player, playlist or video.
  • units (string): The units for height and width.
  • video_id (string): Video ID.
  • width (int): Width of the player.

File

templates/brightcove-player-fixed.html.twig
View source
  1. {#
  2. /**
  3. * @file brightcove-video-player.html.twig
  4. * Default theme implementation to display Brightcove video player.
  5. *
  6. * This template is used when dispalying the Brightcove video player.
  7. *
  8. * Available variables:
  9. * - account (string): Account ID.
  10. * - data_usage (string): Module version indicator.
  11. * - embed (string): Parent/child relationship, where parent is always
  12. default, and child players has the ID of the parent
  13. player.
  14. * - height (int): Height of the player.
  15. * - id (int): ID of the Brightcove video or playlist.
  16. * - is_playlist (bool): Indicates whether it is a playlist player or a
  17. single video player.
  18. * - player (string): Player ID.
  19. * - type (string): The type of the player, playlist or video.
  20. * - units (string): The units for height and width.
  21. * - video_id (string): Video ID.
  22. * - width (int): Width of the player.
  23. *
  24. * @ingroup themeable
  25. */
  26. #}
  27. <div class="brightcove-player sizing-fixed">
  28. <video-js controls=""
  29. data-account="{{- account -}}"
  30. data-embed="{{- embed -}}"
  31. data-player="{{- player -}}"
  32. data-usage="{{- data_usage -}}"
  33. data-{{- type -}}-id="{{- id -}}"
  34. {% if units == 'px' or units is null %}
  35. height = "{{- height -}}" width = "{{- width -}}"
  36. {% else %}
  37. style="{{- width != null ? 'width:' ~ width ~ units : '' -}};{{- height != null ? 'height:' ~ height ~ units : '' -}};"
  38. {% endif %}
  39. ></video-js>
  40. {% if is_playlist %}
  41. <ol class="vjs-playlist"></ol>
  42. {% endif %}
  43. <script src="//players.brightcove.net/{{- account -}}/{{- player -}}_{{- embed -}}/index.min.js"></script>
  44. </div>