Skip to content

Commit

Permalink
Update test-video-cache.js with VP9 codec values that are known to be…
Browse files Browse the repository at this point in the history
… playable (#36376)
  • Loading branch information
coreymasanto committed Oct 15, 2021
1 parent 30be4d5 commit 65e02ac
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions extensions/amp-video/0.1/test/test-video-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describes.realWin('amp-video cached-sources', {amp: true}, (env) => {
sources: [
{
'url': 'video1.mp4',
'codec': 'vp09.02.30.11',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 700,
type: 'video/mp4',
},
Expand All @@ -176,10 +176,11 @@ describes.realWin('amp-video cached-sources', {amp: true}, (env) => {
await fetchCachedSources(videoEl, env.ampdoc);

const addedSources = videoEl.querySelectorAll('source');

const srcType0 = addedSources[0].getAttribute('type');
const srcType1 = addedSources[1].getAttribute('type');
const srcType2 = addedSources[2].getAttribute('type');
expect(srcType0).to.equal('video/mp4; codecs=vp09.02.30.11');
expect(srcType0).to.equal('video/mp4; codecs=vp09.00.30.08');
expect(srcType1).to.equal('video/mp4');
expect(srcType2).to.equal('video/mp4; codecs=unknown');
});
Expand All @@ -191,19 +192,19 @@ describes.realWin('amp-video cached-sources', {amp: true}, (env) => {
sources: [
{
'url': 'video1.mp4',
'codec': 'vp09.02.30.11',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 700,
type: 'video/mp4',
},
{
'url': 'video2.mp4',
'codec': 'vp09.00.15.08',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 2000,
type: 'video/mp4',
},
{
'url': 'video3.mp4',
'codec': 'vp09.00.25.00',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 1500,
type: 'video/mp4',
},
Expand Down Expand Up @@ -234,13 +235,13 @@ describes.realWin('amp-video cached-sources', {amp: true}, (env) => {
},
{
'url': 'video2.mp4',
'codec': 'vp09.02.30.11',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 1000,
type: 'video/mp4',
},
{
'url': 'video3.mp4',
'codec': 'vp09.00.15.08',
'codec': 'vp09.00.30.08',
'bitrate_kbps': 2000,
type: 'video/mp4',
},
Expand All @@ -265,10 +266,10 @@ describes.realWin('amp-video cached-sources', {amp: true}, (env) => {
const srcType3 = addedSources[3].getAttribute('type');

expect(addedSources[0].getAttribute('data-bitrate')).to.equal('2000');
expect(srcType0).to.equal('video/mp4; codecs=vp09.00.15.08');
expect(srcType0).to.equal('video/mp4; codecs=vp09.00.30.08');

expect(addedSources[1].getAttribute('data-bitrate')).to.equal('1000');
expect(srcType1).to.equal('video/mp4; codecs=vp09.02.30.11');
expect(srcType1).to.equal('video/mp4; codecs=vp09.00.30.08');

expect(addedSources[2].getAttribute('data-bitrate')).to.equal('3000');
expect(srcType2).to.equal('video/mp4');
Expand Down

0 comments on commit 65e02ac

Please sign in to comment.