@khanacademy/perseus 13.0.0 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -44070,6 +44070,7 @@ const DEFAULT_HEIGHT = 720;
44070
44070
  const KA_EMBED = "{host}/embed_video?slug={slug}" + "&internal_video_only=1";
44071
44071
  const IS_URL = /^https?:\/\//;
44072
44072
  const IS_KA_SITE = /(khanacademy\.org|localhost)/;
44073
+ const IS_VIMEO = /(vimeo\.com)/;
44073
44074
 
44074
44075
  // exports has no 'transform'
44075
44076
 
@@ -44117,6 +44118,16 @@ class Video extends React__namespace.Component {
44117
44118
  let url;
44118
44119
  if (IS_URL.test(location)) {
44119
44120
  url = location;
44121
+ if (IS_VIMEO.test(url)) {
44122
+ // If this is a vimeo video, we need to add the query string
44123
+ // parameter "dnt" so that analytics/tracking cookies aren't set.
44124
+ // https://help.vimeo.com/hc/en-us/articles/12426260232977-Player-parameters-overview
44125
+ if (url.indexOf("?") === -1) {
44126
+ url += "?dnt=1";
44127
+ } else {
44128
+ url += "&dnt=1";
44129
+ }
44130
+ }
44120
44131
  } else {
44121
44132
  url = KA_EMBED.replace("{slug}", location);
44122
44133
  let embedHostname = "https://www.khanacademy.org";
@@ -44197,7 +44208,7 @@ const init = function (options) {
44197
44208
 
44198
44209
  // This file is processed by a Rollup plugin (replace) to inject the production
44199
44210
  const libName = "@khanacademy/perseus";
44200
- const libVersion = "13.0.0";
44211
+ const libVersion = "13.1.0";
44201
44212
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
44202
44213
 
44203
44214
  const apiVersion = {