@vidispine/vdt-videojs 23.3.0-pre.6 → 23.3.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
@@ -1,6 +1,6 @@
1
1
  import m from "mousetrap";
2
2
  import v from "video.js/dist/alt/video.core.min";
3
- const D = "@vidispine/vdt-videojs", B = "23.3.0-pre.6", I = "SEE LICENSE IN LICENSE.md", M = {
3
+ const D = "@vidispine/vdt-videojs", B = "23.3.0", I = "SEE LICENSE IN LICENSE.md", M = {
4
4
  access: "public"
5
5
  }, P = "Javascript player based on videojs", O = "https://vidispine.github.io/vdt/?path=/docs/vdt-videojs", R = {
6
6
  type: "git",
@@ -21,15 +21,15 @@ const D = "@vidispine/vdt-videojs", B = "23.3.0-pre.6", I = "SEE LICENSE IN LICE
21
21
  format: "prettier . --check"
22
22
  }, X = {
23
23
  mousetrap: "1.6.5",
24
- "video.js": "7.21.2"
24
+ "video.js": "7.21.5"
25
25
  }, q = {
26
26
  "@vidispine/eslint-config-base": "workspace:*",
27
27
  "@vidispine/eslint-config-mdx": "workspace:*",
28
28
  "@vidispine/eslint-config-storybook": "workspace:*",
29
29
  "@vidispine/prettier-config": "workspace:*",
30
- eslint: "8.34.0",
31
- prettier: "2.8.4",
32
- vite: "4.3.9"
30
+ eslint: "8.48.0",
31
+ prettier: "2.8.8",
32
+ vite: "4.4.9"
33
33
  }, J = [
34
34
  "since 2017-06"
35
35
  ], G = {
@@ -574,9 +574,9 @@ class re {
574
574
  });
575
575
  }
576
576
  open() {
577
- this.render(), this.menuContainer.classList.add("open"), this.props.onOpen && this.props.onOpen(), this.state.opened = !0, this.handleClicksWhenMenuOpened || (this.handleClicksWhenMenuOpened = function(e) {
577
+ this.render(), this.menuContainer.classList.add("open"), this.props.onOpen && this.props.onOpen(), this.state.opened = !0, this.handleClicksWhenMenuOpened || (this.handleClicksWhenMenuOpened = (function(e) {
578
578
  this.state.opened && (e.stopPropagation(), this.container.contains(e.target) || this.close());
579
- }.bind(this)), this.handleClicksWhenMenuOpenedTimeout = setTimeout(() => {
579
+ }).bind(this)), this.handleClicksWhenMenuOpenedTimeout = setTimeout(() => {
580
580
  document.addEventListener("click", this.handleClicksWhenMenuOpened), m.bind("esc", this.close.bind(this));
581
581
  }, h.animationLength);
582
582
  }
@@ -1,4 +1,4 @@
1
- (function(g,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("mousetrap"),require("video.js/dist/alt/video.core.min")):typeof define=="function"&&define.amd?define(["exports","mousetrap","video.js/dist/alt/video.core.min"],p):(g=typeof globalThis<"u"?globalThis:g||self,p(g["@vidispine/vdt-videojs"]={},g.mousetrap,g.videojs))})(this,function(g,p,v){"use strict";const L={name:"@vidispine/vdt-videojs",version:"23.3.0-pre.6",license:"SEE LICENSE IN LICENSE.md",publishConfig:{access:"public"},description:"Javascript player based on videojs",homepage:"https://vidispine.github.io/vdt/?path=/docs/vdt-videojs",repository:{type:"git",url:"https://github.com/vidispine/vdt.git",directory:"packages/vdt-videojs"},type:"module",main:"./dist/index.umd.cjs",module:"./dist/index.js",style:"./dist/index.css",exports:{".":{import:"./dist/index.js",require:"./dist/index.umd.cjs"},"./dist/index.css":"./dist/index.css"},files:["dist"],scripts:{build:"yarn vite build","build:watch":"yarn vite build --watch --mode development",lint:"eslint . --cache --max-warnings=0 --ext .js,.jsx,.ts,.tsx,.md,.mdx",format:"prettier . --check"},dependencies:{mousetrap:"1.6.5","video.js":"7.21.2"},devDependencies:{"@vidispine/eslint-config-base":"workspace:*","@vidispine/eslint-config-mdx":"workspace:*","@vidispine/eslint-config-storybook":"workspace:*","@vidispine/prettier-config":"workspace:*",eslint:"8.34.0",prettier:"2.8.4",vite:"4.3.9"},browserslist:["since 2017-06"],eslintConfig:{extends:["@vidispine/eslint-config-base","@vidispine/eslint-config-mdx","@vidispine/eslint-config-storybook"]},prettier:"@vidispine/prettier-config"},I=Object.freeze({frameRate:3e4/1001,jumpSeconds:10,inactivityTimeout:1200,audioInactivityTimeout:0}),k=Object.freeze({play:0,pause:1,volchange:2,jumpForward:3,jumpBackward:4}),M=Object.freeze({volume:"volume-setting",subLang:"subtitles-language",subs:"subtitles-enabled"}),u=Object.freeze({poster:"has-poster",subtitles:"has-subtitles",subtitlesActive:"subtitles-active",onDark:"on-dark",loading:"loading"}),f=Object.freeze({gray:"#787878",light:"rgba(255,255,255,.75)"}),P=Object.freeze({name:L.name.split("/")[1],vendor:L.name.split("/")[0]}),l=Object.freeze({defaults:I,settings:M,classNames:u,colors:f,osd:k,packageInfo:P});function O(c,e){return c.length>e?`${c.substring(0,e)}...`:c}function j(){function c(e){if(typeof e=="object"){const t=Object.getOwnPropertyNames(e),s=Object.getPrototypeOf(this);t.forEach(o=>{const i=Object.getOwnPropertyDescriptor(s,o);i&&i.set&&(this[o]=e[o])})}}this.handleNewProps=c}function x(c){const e=document.createElement("div");return e.textContent=c,e.innerHTML}const a=Object.freeze({play:"play-pause",start:"start",fb:"frame-backward",ff:"frame-forward",end:"end"}),R=[a.start,a.fb,a.play,a.ff,a.end],H=`
1
+ (function(g,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("mousetrap"),require("video.js/dist/alt/video.core.min")):typeof define=="function"&&define.amd?define(["exports","mousetrap","video.js/dist/alt/video.core.min"],p):(g=typeof globalThis<"u"?globalThis:g||self,p(g["@vidispine/vdt-videojs"]={},g.mousetrap,g.videojs))})(this,function(g,p,v){"use strict";const L={name:"@vidispine/vdt-videojs",version:"23.3.0",license:"SEE LICENSE IN LICENSE.md",publishConfig:{access:"public"},description:"Javascript player based on videojs",homepage:"https://vidispine.github.io/vdt/?path=/docs/vdt-videojs",repository:{type:"git",url:"https://github.com/vidispine/vdt.git",directory:"packages/vdt-videojs"},type:"module",main:"./dist/index.umd.cjs",module:"./dist/index.js",style:"./dist/index.css",exports:{".":{import:"./dist/index.js",require:"./dist/index.umd.cjs"},"./dist/index.css":"./dist/index.css"},files:["dist"],scripts:{build:"yarn vite build","build:watch":"yarn vite build --watch --mode development",lint:"eslint . --cache --max-warnings=0 --ext .js,.jsx,.ts,.tsx,.md,.mdx",format:"prettier . --check"},dependencies:{mousetrap:"1.6.5","video.js":"7.21.5"},devDependencies:{"@vidispine/eslint-config-base":"workspace:*","@vidispine/eslint-config-mdx":"workspace:*","@vidispine/eslint-config-storybook":"workspace:*","@vidispine/prettier-config":"workspace:*",eslint:"8.48.0",prettier:"2.8.8",vite:"4.4.9"},browserslist:["since 2017-06"],eslintConfig:{extends:["@vidispine/eslint-config-base","@vidispine/eslint-config-mdx","@vidispine/eslint-config-storybook"]},prettier:"@vidispine/prettier-config"},I=Object.freeze({frameRate:3e4/1001,jumpSeconds:10,inactivityTimeout:1200,audioInactivityTimeout:0}),k=Object.freeze({play:0,pause:1,volchange:2,jumpForward:3,jumpBackward:4}),M=Object.freeze({volume:"volume-setting",subLang:"subtitles-language",subs:"subtitles-enabled"}),u=Object.freeze({poster:"has-poster",subtitles:"has-subtitles",subtitlesActive:"subtitles-active",onDark:"on-dark",loading:"loading"}),f=Object.freeze({gray:"#787878",light:"rgba(255,255,255,.75)"}),P=Object.freeze({name:L.name.split("/")[1],vendor:L.name.split("/")[0]}),l=Object.freeze({defaults:I,settings:M,classNames:u,colors:f,osd:k,packageInfo:P});function O(c,e){return c.length>e?`${c.substring(0,e)}...`:c}function j(){function c(e){if(typeof e=="object"){const t=Object.getOwnPropertyNames(e),s=Object.getPrototypeOf(this);t.forEach(o=>{const i=Object.getOwnPropertyDescriptor(s,o);i&&i.set&&(this[o]=e[o])})}}this.handleNewProps=c}function x(c){const e=document.createElement("div");return e.textContent=c,e.innerHTML}const a=Object.freeze({play:"play-pause",start:"start",fb:"frame-backward",ff:"frame-forward",end:"end"}),R=[a.start,a.fb,a.play,a.ff,a.end],H=`
2
2
  .vdt-external-controls{
3
3
  display: flex;
4
4
  justify-content: center;
@@ -244,7 +244,7 @@
244
244
  <td class="caret">▷</td>
245
245
  `:this.container.innerHTML=`
246
246
  <td class="title"></td>
247
- `;const e=this.container.getElementsByClassName("title")[0],t=this.props.items?this.container.getElementsByClassName("subtitle")[0]:!1;e.textContent=this.props.title,t&&(t.textContent=this.props.subtitle)}}class W{constructor(e){this.props=e,this.container=document.createElement("div"),this.container.className=`${h.className}`,this.state={opened:!1,selectedItem:0,items:[],subItems:[]},this.mount(),this.draw()}mount(){this.props.target&&(this.container.style.position="absolute",this.container.style.bottom=this.container.style.right="0px",this.container.style.height="100%",this.container.style.overflow="hidden",this.container.style.width="30%",this.container.style.minWidth="250px",this.container.style.maxWidth="320px",this.shadow=this.container.attachShadow({mode:"open"}),this.props.target&&this.props.target.appendChild(this.container),this.menuContainer=document.createElement("div"),this.menuContainer.className="menu",this.shadow.appendChild(this.menuContainer),this.style=document.createElement("style"),this.style.type="text/css",this.style.innerHTML=z(),this.shadow.appendChild(this.style))}draw(){const e=document.createElement("div");e.className="level-1",this.mainLevel=document.createElement("table"),e.innerHTML="<h3>Settings</h3>",e.appendChild(this.mainLevel);const t=document.createElement("div");t.className="level-2",this.subLvlTitle=document.createElement("h3"),this.subLvlTitle.onclick=()=>{this.up()},t.appendChild(this.subLvlTitle),this.secondaryLevel=document.createElement("table"),t.appendChild(this.secondaryLevel),this.menuContainer.appendChild(e),this.menuContainer.appendChild(t),this.props.items.forEach(s=>{const o=s.items[s.getActiveIndex(s.items)].title||"",i=new F({target:this.mainLevel,subtitle:o,onClick:()=>{this.handleSupItemSelected(s)},...s});this.state.items.push(i)})}open(){this.render(),this.menuContainer.classList.add("open"),this.props.onOpen&&this.props.onOpen(),this.state.opened=!0,this.handleClicksWhenMenuOpened||(this.handleClicksWhenMenuOpened=function(e){this.state.opened&&(e.stopPropagation(),this.container.contains(e.target)||this.close())}.bind(this)),this.handleClicksWhenMenuOpenedTimeout=setTimeout(()=>{document.addEventListener("click",this.handleClicksWhenMenuOpened),p.bind("esc",this.close.bind(this))},h.animationLength)}close(){this.menuContainer.classList.remove("open"),this.state.opened=!1,this.handleClicksWhenMenuOpenedTimeout&&clearTimeout(this.handleClicksWhenMenuOpenedTimeout),document.removeEventListener("click",this.handleClicksWhenMenuOpened),this.props.onClose&&this.props.onClose(),p.unbind("esc")}toggle(){this.state.opened?this.close():this.open()}up(){this.menuContainer.classList.remove(h.subLvlClassName),this.render()}handleSupItemSelected(e){this.subLvlTitle.textContent=e.title,this.renderSubItems(e.items,e.getActiveIndex(e.items)),this.menuContainer.classList.add(h.subLvlClassName)}renderSubItems(e,t=!1){this.secondaryLevel.innerHTML="";const s=[];e.forEach((o,i)=>{const r=new F({target:this.secondaryLevel,...o,onClick:n=>{this.handleSubItemSelected(n,o)},selected:i===t});s.push(r)}),this.state.subItems=s}handleSubItemSelected(e,t){this.close(),t.onClick&&t.onClick(e,t),this.up()}get opened(){return this.state.opened}set opened(e){this.state.opened=e}render(){this.state.items.forEach((e,t)=>{const{items:s}=this.props,o=s[t].getActiveIndex(s[t].items),i=s[t].items[o].title;e.props.subtitle=i,e.render()})}}class _{constructor(e){this.props=e,this.state={enabled:!0},this.container=document.createElement("div"),this.container.className="vdt-player-osd",this.container.innerHTML=`
247
+ `;const e=this.container.getElementsByClassName("title")[0],t=this.props.items?this.container.getElementsByClassName("subtitle")[0]:!1;e.textContent=this.props.title,t&&(t.textContent=this.props.subtitle)}}class W{constructor(e){this.props=e,this.container=document.createElement("div"),this.container.className=`${h.className}`,this.state={opened:!1,selectedItem:0,items:[],subItems:[]},this.mount(),this.draw()}mount(){this.props.target&&(this.container.style.position="absolute",this.container.style.bottom=this.container.style.right="0px",this.container.style.height="100%",this.container.style.overflow="hidden",this.container.style.width="30%",this.container.style.minWidth="250px",this.container.style.maxWidth="320px",this.shadow=this.container.attachShadow({mode:"open"}),this.props.target&&this.props.target.appendChild(this.container),this.menuContainer=document.createElement("div"),this.menuContainer.className="menu",this.shadow.appendChild(this.menuContainer),this.style=document.createElement("style"),this.style.type="text/css",this.style.innerHTML=z(),this.shadow.appendChild(this.style))}draw(){const e=document.createElement("div");e.className="level-1",this.mainLevel=document.createElement("table"),e.innerHTML="<h3>Settings</h3>",e.appendChild(this.mainLevel);const t=document.createElement("div");t.className="level-2",this.subLvlTitle=document.createElement("h3"),this.subLvlTitle.onclick=()=>{this.up()},t.appendChild(this.subLvlTitle),this.secondaryLevel=document.createElement("table"),t.appendChild(this.secondaryLevel),this.menuContainer.appendChild(e),this.menuContainer.appendChild(t),this.props.items.forEach(s=>{const o=s.items[s.getActiveIndex(s.items)].title||"",i=new F({target:this.mainLevel,subtitle:o,onClick:()=>{this.handleSupItemSelected(s)},...s});this.state.items.push(i)})}open(){this.render(),this.menuContainer.classList.add("open"),this.props.onOpen&&this.props.onOpen(),this.state.opened=!0,this.handleClicksWhenMenuOpened||(this.handleClicksWhenMenuOpened=(function(e){this.state.opened&&(e.stopPropagation(),this.container.contains(e.target)||this.close())}).bind(this)),this.handleClicksWhenMenuOpenedTimeout=setTimeout(()=>{document.addEventListener("click",this.handleClicksWhenMenuOpened),p.bind("esc",this.close.bind(this))},h.animationLength)}close(){this.menuContainer.classList.remove("open"),this.state.opened=!1,this.handleClicksWhenMenuOpenedTimeout&&clearTimeout(this.handleClicksWhenMenuOpenedTimeout),document.removeEventListener("click",this.handleClicksWhenMenuOpened),this.props.onClose&&this.props.onClose(),p.unbind("esc")}toggle(){this.state.opened?this.close():this.open()}up(){this.menuContainer.classList.remove(h.subLvlClassName),this.render()}handleSupItemSelected(e){this.subLvlTitle.textContent=e.title,this.renderSubItems(e.items,e.getActiveIndex(e.items)),this.menuContainer.classList.add(h.subLvlClassName)}renderSubItems(e,t=!1){this.secondaryLevel.innerHTML="";const s=[];e.forEach((o,i)=>{const r=new F({target:this.secondaryLevel,...o,onClick:n=>{this.handleSubItemSelected(n,o)},selected:i===t});s.push(r)}),this.state.subItems=s}handleSubItemSelected(e,t){this.close(),t.onClick&&t.onClick(e,t),this.up()}get opened(){return this.state.opened}set opened(e){this.state.opened=e}render(){this.state.items.forEach((e,t)=>{const{items:s}=this.props,o=s[t].getActiveIndex(s[t].items),i=s[t].items[o].title;e.props.subtitle=i,e.render()})}}class _{constructor(e){this.props=e,this.state={enabled:!0},this.container=document.createElement("div"),this.container.className="vdt-player-osd",this.container.innerHTML=`
248
248
  <table>
249
249
  <tbody>
250
250
  <td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-videojs",
3
- "version": "23.3.0-pre.6",
3
+ "version": "23.3.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,16 +34,16 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "mousetrap": "1.6.5",
37
- "video.js": "7.21.2"
37
+ "video.js": "7.21.5"
38
38
  },
39
39
  "devDependencies": {
40
- "@vidispine/eslint-config-base": "23.3.0-pre.6",
41
- "@vidispine/eslint-config-mdx": "23.3.0-pre.6",
42
- "@vidispine/eslint-config-storybook": "23.3.0-pre.6",
43
- "@vidispine/prettier-config": "23.3.0-pre.6",
44
- "eslint": "8.34.0",
45
- "prettier": "2.8.4",
46
- "vite": "4.3.9"
40
+ "@vidispine/eslint-config-base": "23.3.0",
41
+ "@vidispine/eslint-config-mdx": "23.3.0",
42
+ "@vidispine/eslint-config-storybook": "23.3.0",
43
+ "@vidispine/prettier-config": "23.3.0",
44
+ "eslint": "8.48.0",
45
+ "prettier": "2.8.8",
46
+ "vite": "4.4.9"
47
47
  },
48
48
  "browserslist": [
49
49
  "since 2017-06"