Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Video.js - Basic Example with Page Sharing coding

With the Video.js 8.10.0 update, the page link is no longer provided out-of-the-box.

You can however, add it manually in the Additional JavaScript tags TeamSite template component.

More information at https://www.nuevodevel.com/nuevo/showcase/share

Coding examples below (you will need to change the paramater values and links for particular videos).
1. Share the video with a Link within the player.
2. Share the video with Embed code within the player.
3. Share the video with a Link and Embed code within the player.


Share the video with a Link within the player

Keyboard controls: Space bar - toggle play/pause; Right and Left Arrow - seek the video forwards and back; Up and Down Arrow - increase and decrease the volume; M key - toggle mute/unmute; F key - toggle fullscreen off and on.

Transcript: Symposium Overview

Alternatively, you can download and play the mp4 video file (34.9 MB) and the vtt caption file.

Add the highlighted section to the "Additional JavaScript tags" TeamSite Template component for that particular video.

<script>
  var player = videojs('player_one');
      player.nuevo({
         title: 'Video JS - Basic Example sharing with a Link in the player',
         url: 'https://www.nlm.nih.gov/web/documentation/TemplateDocumentation/videojs_basic_sharing_example.html'
      });
      player.hotkeys({  // Section needed for keyboard access to work
                                volumeStep: 0.1,
                                seekStep: 5,
                                alwaysCaptureHotkeys: true
                });
</script>

Share the video with Embed code within the player

Keyboard controls: Space bar - toggle play/pause; Right and Left Arrow - seek the video forwards and back; Up and Down Arrow - increase and decrease the volume; M key - toggle mute/unmute; F key - toggle fullscreen off and on.

Transcript: Symposium Overview

Alternatively, you can download and play the mp4 video file (34.9 MB) and the vtt caption file.

Add the highlighted section to the "Additional JavaScript tags" TeamSite Template component for that particular video.

<script>
  var player = videojs('player_two');
      player.nuevo({
         title: 'Video JS - Basic Example sharing with Embed Code',
        embed: '<iframe src=https://www.nlm.nih.gov/web/documentation/TemplateDocumentation/videojs_basic_sharing_example.html width="640" height="360" frameborder="0" allowfullscreen></iframe>'
      });
      player.hotkeys({  // Section needed for keyboard access to work
                                volumeStep: 0.1,
                                seekStep: 5,
                                alwaysCaptureHotkeys: true
                });
</script>

Share the video with a Link and Embed code within the player

Keyboard controls: Space bar - toggle play/pause; Right and Left Arrow - seek the video forwards and back; Up and Down Arrow - increase and decrease the volume; M key - toggle mute/unmute; F key - toggle fullscreen off and on.

Transcript: Symposium Overview

Alternatively, you can download and play the mp4 video file (34.9 MB) and the vtt caption file.

Add the highlighted section to the "Additional JavaScript tags" TeamSite Template component for that particular video.

<script>
  var player = videojs('player_three');
      player.nuevo({
         title: 'Video JS - Basic Example sharing with a Link and Embed Code',
         url: 'https://www.nlm.nih.gov/web/documentation/TemplateDocumentation/videojs_basic_sharing_example.html',
        embed: '<iframe src=https://www.nlm.nih.gov/web/documentation/TemplateDocumentation/videojs_basic_sharing_example.html width="640" height="360" frameborder="0" allowfullscreen></iframe>'
      });
      player.hotkeys({  // Section needed for keyboard access to work
                                volumeStep: 0.1,
                                seekStep: 5,
                                alwaysCaptureHotkeys: true
                });
</script>

Last Reviewed: February 14, 2024