Skip to main content

Migration & legacy versions (v4 → v5)

nanoStream Player version 5 adds MOQ (Media over QUIC) playback and changes several defaults. Most v4 configs keep working, but some behave differently without throwing an error. This page lists every change and gives you a checklist for the upgrade.

Upgrade in four steps​

  1. Change the script URL from nanoplayer.4.min.js to nanoplayer.5.min.js:

    <script src="https://demo.nanocosmos.de/nanoplayer/api/release/nanoplayer.5.min.js"></script>
  2. Go through Changed defaults and set any value you relied on explicitly.

  3. Remove features that no longer exist (see Removed in v5).

  4. Test on real devices, with MOQ on and off, and check your error handling and analytics.

Changed defaults​

A v4 config that doesn't set these keys behaves differently under v5:

Keyv4 defaultv5 defaultEffect
playback.latencyControlMode"classic""balancedadaptive"The player adapts latency to stream and network conditions
playback.automutefalsetrueBlocked unmuted autoplay now falls back to muted playback
playback.faststartfalsetrueShorter time to first frame
source.startIndex0 (highest quality)entries.length - 1 (lowest quality)Multi-entry sources start on the lowest rendition
source.options.adaption.rule"none""deviationOfMean2" for groups and for 3 or more entries; "none" for 2 entriesABR is on for groups and for 3 or more entries
source.options.adaption.downStep12 for 3 or more entries; 1 for 1 or 2ABR down-switches skip at least two steps
source.group.startQuality—"low"Groups start on the lowest rendition
source.options.switch.timeout—20 seconds (5–30)Also applies to updateSource()

To keep v4 behaviour, set the old values explicitly:

var config = {
source: {
entries: [ /* ... */ ],
startIndex: 0,
options: { adaption: { rule: "none" } }
},
playback: {
latencyControlMode: "classic",
automute: false,
faststart: false
}
};
note

The v5 ABR default depends on the source. Groups and lists of three or more entries use deviationOfMean2. A list of exactly two entries uses none and doesn't switch automatically unless you set the rule. If you depend on a specific behaviour, set options.adaption.rule explicitly.

New in v5​

KeyDefaultDescription
playback.enableMediaOverQuictrueMOQ playback, with automatic fallback to WebSocket/MSE
playback.enableQuicConnectionProbetrueTests QUIC connectivity at setup to pick the best technology
playback.volume1.0Initial volume, 0.0–1.0
playback.manageAudioSessionTypetrueSince 5.0.11. iOS audio plays with the silent switch on.
source.general.baseDomain—Since 5.1.0. One root domain for player, API and metrics hosts.

With source.group, bintu.streamid or defaults.service: "bintu", MOQ works without changes. With custom server URLs, add h5live.server.webtransport to each entry, or MOQ isn't available for that entry:

server: {
websocket: "wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4",
hls: "https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8",
progressive: "https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4",
webtransport: "https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4"
}

Canvas instead of video element (MOQ)​

MOQ playback renders to a <canvas>, not an HTML5 <video> element. This matters if your code:

  • binds the player to an existing video element with playback.videoId,
  • reads frames from the video element (snapshots, overlays, effects),
  • styles or measures the <video> element directly.

Your options:

  • Disable MOQ with playback.enableMediaOverQuic: false to keep MSE playback with a <video> element.
  • Style the player container (#playerDiv) instead of the media element.
  • Stay on v4 if you can't remove the video element dependency.

Since 5.0.7, a MOQ canvas with style.view: false displays the same way as a video element in MSE/HLS playback.

Removed in v5​

RemovedReplacement
Flash Player fallbackNone. Stay on v4 if you need it.
Native HLS on iOS below 10None. Stay on v4 if you need it.
Internet Explorer 11Use a current browser, or stay on v4
style.scaling: "resize" and "original"Use "letterbox", "fill" or "crop"

Analytics after the upgrade​

Since Analytics API version 2.36.0, MOQ playback is reported under /v2/moq/* and /v2/h5live/* covers WebSocket/MSE playback only. After upgrading, part of your audience moves to MOQ, so H5Live figures alone drop. Add both route groups for a total. See Analytics API.

Migration checklist​

  • Script URL points to nanoplayer.5.min.js
  • latencyControlMode, automute, faststart, startIndex and adaption.rule set explicitly where you depend on them
  • Two-entry source.entries lists have an explicit adaption.rule if they should switch automatically
  • Custom h5live.server objects include webtransport
  • No style.scaling: "resize" or "original"
  • Code that uses videoId or reads the <video> element tested with MOQ, or MOQ disabled
  • Embed URLs use embed v2.0.0 (see below)
  • Dashboards and reports read both /v2/h5live/* and /v2/moq/*

Embed player v2.0.0​

The hosted iframe embed moved to version 2.0.0 together with player v5. It loads nanoplayer.5.min.js and checks types strictly: only the strings true and false count as booleans. A v1.x URL with playback.metadata=1 or playback.autoplay=0 silently loses those settings. Replace 1/0 with true/false. See Embed the player.

Legacy v4​

Player v4 is the legacy version. The latest v4 release is 4.31.2 (stability fixes for iOS playback and group.startQuality selection). Use it only if you depend on something v5 removed.

<script src="https://demo.nanocosmos.de/nanoplayer/api/release/nanoplayer.4.min.js"></script>

Older v4 features you may still meet in existing code:

Legacy patternCurrent approach
Single stream in source.h5live (pre-4.3)Use source.entries with one entry, or source.group
STS security tokens (security.token, expires, options, tag)Deprecated. Use JWT playback tokens in security.jwtoken. See Playback tokens.
options.switch.fastStartDeprecated. Use playback.faststart.
latencyControlMode: "classic" with custom tweaks.bufferPrefer balancedadaptive with default buffers

More retired products and pages: Legacy & retired docs.

Next steps​