Skip to content

Commit

Permalink
add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Jun 14, 2023
1 parent 501f971 commit ee14ac8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/content/insertable-streams/video-replay/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ const IVF2WebCodecs = {
VP80: 'vp8',
VP90: 'vp09.00.10.08',
H264: 'avc1.42E01F',
AV01: 'av01.0.08M.08.0.110.09', // AV1 Main Profile, level 4.0, Main tier, 8-bit content, non-monochrome, with 4:2:0 chroma subsampling
};

const input = document.getElementById('input');
const localVideo = document.getElementById('localVideo');
const metadata = document.getElementById('metadata');

input.onchange = async (event) => {
event.target.disabled = true;
const file = event.target.files[0];
Expand All @@ -96,6 +96,7 @@ input.onchange = async (event) => {
frame.close();
const nextFrame = await ivf.readFrame();
if (nextFrame) {

Check failure on line 98 in src/content/insertable-streams/video-replay/js/main.js

View workflow job for this annotation

GitHub Actions / lint

Block must not be padded by blank lines

decoder.decode(new EncodedVideoChunk({
timestamp: Number(nextFrame.timestamp - firstFrame.timestamp) * 1000,
type: 'delta',
Expand All @@ -107,6 +108,8 @@ input.onchange = async (event) => {
},
error: e => console.error(e.message, e),
});
VideoDecoder.isConfigSupported({codec: IVF2WebCodecs[header.codec], codedWidth: header.width, codedHeight: header.height})
.then(config => console.log(config))

Check failure on line 112 in src/content/insertable-streams/video-replay/js/main.js

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 6 spaces but found 2

Check failure on line 112 in src/content/insertable-streams/video-replay/js/main.js

View workflow job for this annotation

GitHub Actions / lint

Missing semicolon
decoder.configure({
codec: IVF2WebCodecs[header.codec],
codedWidth: header.width,
Expand Down

0 comments on commit ee14ac8

Please sign in to comment.