Skip to content

Commit

Permalink
[6659] XB returns transcoded-video control XML instead of JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
rart committed Apr 1, 2024
1 parent 1b4920f commit 2fa5d7b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 79 deletions.
22 changes: 13 additions & 9 deletions ui/app/src/utils/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,16 +572,20 @@ function parseElementByContentType(
return getInnerHtml(element) === 'true';
case 'numeric-input':
return getInnerHtmlNumber(element, parseFloat);
case 'transcoded-video-picker':
case 'taxonomy-selector':
return getInnerHtml(element);
default:
console.log(
`%c[parseElementByContentType] Missing type "${type}" on switch statement for field "${field.id}".`,
'color: blue',
element
);
return getInnerHtml(element);
!['transcoded-video', 'transcoded-video-picker', 'taxonomy-selector'].includes(type) &&
console.log(
`%c[parseElementByContentType] Missing type "${type}" on switch statement for field "${field.id}".`,
'color: blue',
element
);
try {
const extract: any = deserialize(element)?.[element.tagName] ?? '';
return extract.item ? (Array.isArray(extract.item) ? extract.item : [extract.item]) : extract;
} catch (e) {
console.error('[parseElementByContentType] Error deserializing element', element, e);
return getInnerHtml(element);
}
}
}

Expand Down
74 changes: 4 additions & 70 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4948,24 +4948,6 @@ __metadata:
languageName: node
linkType: hard

"@videojs/http-streaming@npm:2.16.0":
version: 2.16.0
resolution: "@videojs/http-streaming@npm:2.16.0"
dependencies:
"@babel/runtime": "npm:^7.12.5"
"@videojs/vhs-utils": "npm:3.0.5"
aes-decrypter: "npm:3.1.3"
global: "npm:^4.4.0"
m3u8-parser: "npm:4.8.0"
mpd-parser: "npm:^0.22.1"
mux.js: "npm:6.0.1"
video.js: "npm:^6 || ^7"
peerDependencies:
video.js: ^6 || ^7
checksum: 10/1f140c55ab756c245696e529a6a05fcb0fc8ca3d76641466b72b21e5be2664da52b98a0c122f361a440271cbcc19958b02c192f20c144523cb317018dde83048
languageName: node
linkType: hard

"@videojs/http-streaming@npm:2.16.2":
version: 2.16.2
resolution: "@videojs/http-streaming@npm:2.16.2"
Expand Down Expand Up @@ -11762,16 +11744,7 @@ __metadata:
languageName: node
linkType: hard

"nanoid@npm:^3.3.4":
version: 3.3.4
resolution: "nanoid@npm:3.3.4"
bin:
nanoid: bin/nanoid.cjs
checksum: 10/4f01aaf742452d8668d1d99a21218eb9eaa703c0291e7ec5bbb17a7c0ac56df3b791723ce4d429f53949b252e1ce26386a0aa6782fce10d44cd617d89c9fe9d2
languageName: node
linkType: hard

"nanoid@npm:^3.3.7":
"nanoid@npm:^3.3.4, nanoid@npm:^3.3.7":
version: 3.3.7
resolution: "nanoid@npm:3.3.7"
bin:
Expand Down Expand Up @@ -14516,16 +14489,7 @@ __metadata:
languageName: node
linkType: hard

"rxjs@npm:^7.0.0":
version: 7.5.5
resolution: "rxjs@npm:7.5.5"
dependencies:
tslib: "npm:^2.1.0"
checksum: 10/9c8af134bc557b0c51aff8fd4d8190cbbb1f3ca4602f46cdded04a0d68bb2581e61ae2fbf583aea4f99ee66dac6cf6c4b31856022a9b929f37c521c048f48465
languageName: node
linkType: hard

"rxjs@npm:^7.8.1":
"rxjs@npm:^7.0.0, rxjs@npm:^7.8.1":
version: 7.8.1
resolution: "rxjs@npm:7.8.1"
dependencies:
Expand Down Expand Up @@ -16292,28 +16256,7 @@ __metadata:
languageName: node
linkType: hard

"video.js@npm:^6 || ^7":
version: 7.21.2
resolution: "video.js@npm:7.21.2"
dependencies:
"@babel/runtime": "npm:^7.12.5"
"@videojs/http-streaming": "npm:2.16.0"
"@videojs/vhs-utils": "npm:^3.0.4"
"@videojs/xhr": "npm:2.6.0"
aes-decrypter: "npm:3.1.3"
global: "npm:^4.4.0"
keycode: "npm:^2.2.0"
m3u8-parser: "npm:4.8.0"
mpd-parser: "npm:0.22.1"
mux.js: "npm:6.0.1"
safe-json-parse: "npm:4.0.0"
videojs-font: "npm:3.2.0"
videojs-vtt.js: "npm:^0.15.4"
checksum: 10/741b68b7a8bf7d7544c327eaf790688165927b77b123629ed7c0f75179146fe0fee23aa986150b2d68534ed74a85bad1a0caa4fa519a73e624f58c7a085defa1
languageName: node
linkType: hard

"video.js@npm:^7.21.5":
"video.js@npm:^6 || ^7, video.js@npm:^7.21.5":
version: 7.21.5
resolution: "video.js@npm:7.21.5"
dependencies:
Expand Down Expand Up @@ -16341,15 +16284,6 @@ __metadata:
languageName: node
linkType: hard

"videojs-vtt.js@npm:^0.15.4":
version: 0.15.4
resolution: "videojs-vtt.js@npm:0.15.4"
dependencies:
global: "npm:^4.3.1"
checksum: 10/4221769200faba0c80f191969dbfca3aa92fe50ce016478770ba580828cae0403fa1821bf791841721b7cfafedd04a75dade7a87655591d311255da15e0c1f6a
languageName: node
linkType: hard

"videojs-vtt.js@npm:^0.15.5":
version: 0.15.5
resolution: "videojs-vtt.js@npm:0.15.5"
Expand Down Expand Up @@ -16492,7 +16426,7 @@ __metadata:
schema-utils: "npm:^4.0.0"
peerDependencies:
webpack: ^4.0.0 || ^5.0.0
checksum: 3004374130f31c2910da39b80e24296009653bb11caa0b8449d962b67e003d7e73d01fbcfda9be1f1f04179f66a9c39f4caf7963df54303b430e39ba5a94f7c2
checksum: 10/3004374130f31c2910da39b80e24296009653bb11caa0b8449d962b67e003d7e73d01fbcfda9be1f1f04179f66a9c39f4caf7963df54303b430e39ba5a94f7c2
languageName: node
linkType: hard

Expand Down

0 comments on commit 2fa5d7b

Please sign in to comment.