GET ID
The Nuevo plugin allows you to set a unique ID for the current media file.A unique video ID is required when using the Nuevo plugin's resume option. Video ID is also required to identify video for media tracking events.A unique video ID is possible to set in several ways:
- As a video source tag parameter:Code snippet<video id="my_player" class="video-js vjs-fluid" preload playsiniline><source src="//path-to-video-playlist.m3u8" type="application/x-mpegURL" video_id="uniqueId"></video>
- When setting up a video source through JavaScript:Code snippetplayer.src({ src:"//path-to-video-playlist.m3u8" type:"application/x-mpegURL" video_id:"uniqueId"});
- As the Nuevo plugin's option:Code snippetplayer.nuevo({ video_id: "uniqueId", title: "video title" });To get the current video ID, use the following function:
Code snippet
var video_id = player.video_id();