Changing video source

Coffee
Santorini
Tears of Steel
Nuevo plugin features dedicated function to change video source in fast and relatively easy way. Besides video source, you can also define poster image, text tracks (subtitles, chapters, progress bar thumbnails), video title & description, video id, video url and whatever other attribute that video.js or nuevo plugin supports for individual media item.

The most simple usage of changeSource() is to provide new media src and type:
Code snippet
<script>
let new_source = {
sources: [
{ src: "//path-to-video.mp4", type: "video/mp4" },
{ src: "//path-to-video.webm", type: "video/webm" }
]
});
player.changeSource(new_source);
</script>
If new source is single HLS or DASH playlist:
Code snippet
<script>
let new_source = {
source: { src: "//path-to-video_playlist.m3u8", type: "application/x-mpegURL" }
});
player.changeSource(new_source);
</script>
As it was mentioned above, it is possible to define poster image, text tracks, video title & description, video id, video permalink, embed code and other possible parameters of the media item. The only required parameter is "sources". All other parameters are optional.
Code snippet
<script>
let new_source = {
source: { src: "//path-to-video_playlist.m3u8", type: "application/x-mpegURL" },
video_id: "media unique id",
title: "media title",
description: "media description",
url: "media permalink",
poster: "media poster",
embed: "embed_code",
infoTitle: "optional title display",
infoDescription: "optional description display",
slideImage: "path-to-progress-bar-thumbs-slide-image",
tracks: [
{ kind:"captions" src:"path-to-captions_en.vtt", srclang:"en", label:"English" default:1 },
{ kind:"captions" src:"path-to-captions_de.vtt", srclang:"de", label:"German" },
{ kind:"captions" src:"path-to-captions_fr.vtt", srclang:"fr", label:"French" },
{ kind:"chapters" src:"path-to-chapters.vtt", srclang:"en" },
]
});
player.changeSource(new_source);
</script>

Video presentation above allows to switch between 3 videos. “Coffee” HLS video includes 2 x subtitles loaded from .vtt files and progress-bar thumbs from slideImage. “Santorini” HLS video includes progress-bar thumbs loaded form .vtt file. “Tears of Steel” video includes 4 x subtitles + video chapters, all loaded from vtt files.