{"action":"created","issue":{"url":"https://api.github.com/repos/google/shaka-player/issues/1391","repository_url":"https://api.github.com/repos/google/shaka-player","labels_url":"https://api.github.com/repos/google/shaka-player/issues/1391/labels{/name}","comments_url":"https://api.github.com/repos/google/shaka-player/issues/1391/comments","events_url":"https://api.github.com/repos/google/shaka-player/issues/1391/events","html_url":"https://github.com/google/shaka-player/issues/1391","id":311161839,"number":1391,"title":"Use Media Capabilities Decoding Info API","user":{"login":"beaufortfrancois","id":634478,"avatar_url":"https://avatars1.githubusercontent.com/u/634478?v=4","gravatar_id":"","url":"https://api.github.com/users/beaufortfrancois","html_url":"https://github.com/beaufortfrancois","followers_url":"https://api.github.com/users/beaufortfrancois/followers","following_url":"https://api.github.com/users/beaufortfrancois/following{/other_user}","gists_url":"https://api.github.com/users/beaufortfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/beaufortfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beaufortfrancois/subscriptions","organizations_url":"https://api.github.com/users/beaufortfrancois/orgs","repos_url":"https://api.github.com/users/beaufortfrancois/repos","events_url":"https://api.github.com/users/beaufortfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/beaufortfrancois/received_events","type":"User","site_admin":false},"labels":[{"id":159144978,"url":"https://api.github.com/repos/google/shaka-player/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/google/shaka-player/milestones/16","html_url":"https://github.com/google/shaka-player/milestone/16","labels_url":"https://api.github.com/repos/google/shaka-player/milestones/16/labels","id":3159492,"number":16,"title":"v2.5","description":"Focus areas:\r\n  - HLS support: key rotation, discontinuities, etc.\r\n  - DASH support: drift tolerance, multi period refactor, etc.\r\n  - Media streaming refactor: attach and detach from video, preload support, etc.\r\n  - Smoother transition for legacy broadcast technologies: SMPTE-TT, etc.\r\n  - Adopt modern web APIs: Fetch, add background fetch to PWA, Network information API, etc.","creator":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars0.githubusercontent.com/u/6843156?v=4","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":0,"state":"open","created_at":"2018-03-04T18:52:11Z","updated_at":"2018-04-05T17:40:51Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-04-04T09:55:36Z","updated_at":"2018-04-05T17:43:02Z","closed_at":null,"author_association":"MEMBER","body":"The Media Capabilities API is an API for querying the user agent about decoding and encoding capabilities of the device, providing better information about the display properties, and real-time feedback about playback so that adaptive streaming can better alter the quality of content based on user perceived quality. The intent of this API is to give more control for content delivery while providing a better user experience.\r\n\r\nI think this would be great to integrate it into Shaka Player as it is going to be enabled by default in Chrome 66 and is already used by YouTube player.\r\n\r\nExample:\r\n\r\n```js\r\nconst mediaConfig = {\r\n  type: 'media-source', // or 'file'\r\n  audio: {\r\n    contentType: 'audio/webm; codecs=opus',\r\n    channels: '2', // audio channels used by the track\r\n    bitrate: 132266, // number of bits used to encode a second of audio\r\n    samplerate: 48000 // number of samples of audio carried per second\r\n  },\r\n  video: {\r\n    contentType: 'video/webm; codecs=\"vp09.00.10.08\"',\r\n    width: 1920,\r\n    height: 1080,\r\n    bitrate: 2646242, // number of bits used to encode a second of video\r\n    framerate: '25' // number of frames used in one second\r\n  }\r\n};\r\n\r\nnavigator.mediaCapabilities.decodingInfo(mediaConfig).then(result => {\r\n  log('This configuration is' +\r\n      (result.supported ? '' : ' NOT') + ' supported,' +\r\n      (result.smooth ? '' : ' NOT') + ' smooth and' +\r\n      (result.powerEfficient ? '' : ' NOT') + ' power efficient.');\r\n});\r\n```\r\n\r\nResources:\r\n- https://wicg.github.io/media-capabilities/\r\n- https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates#media-capabilities-decoding-info-api\r\n- https://googlechrome.github.io/samples/media-capabilities/decoding-info.html\r\n- https://www.chromestatus.com/feature/5869632707624960"},"comment":{"url":"https://api.github.com/repos/google/shaka-player/issues/comments/379018848","html_url":"https://github.com/google/shaka-player/issues/1391#issuecomment-379018848","issue_url":"https://api.github.com/repos/google/shaka-player/issues/1391","id":379018848,"user":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars0.githubusercontent.com/u/6843156?v=4","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T17:43:02Z","updated_at":"2018-04-05T17:43:02Z","author_association":"COLLABORATOR","body":"Rough plan: Use this API (if present) to drive an additional filtering pass on the media.  If any variants are `smooth`, we avoid all non-smooth variants.\r\n\r\nWe may want to consider using the `powerEfficient` field as well if the data-saver flag is on.  See #855."}}
{"actor":{"display_login":"joeyparrish"}}