summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webcodecs/video-encoder-content-hint.https.any.js
blob: cdc32fe3c64ed7afa09d7ca97b59ac2ad18ffdb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// META: global=window,dedicatedworker

promise_test(async t => {
  const config = {
    codec: 'vp8',
    width: 1280,
    height: 720,
    bitrate: 5000000,
    bitrateMode: 'constant',
    framerate: 25,
    latencyMode: 'realtime',
    contentHint: 'text',
  };

  let support = await VideoEncoder.isConfigSupported(config);
  assert_equals(support.supported, true);

  let new_config = support.config;
  assert_equals(new_config.codec, config.codec);
  assert_equals(new_config.contentHint, 'text');
}, 'Test that contentHint is recognized by VideoEncoder');