{"action":"created","issue":{"url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/23","labels_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/23/comments","events_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/23/events","html_url":"https://github.com/eface2face/cordova-plugin-iosrtc/issues/23","id":90846604,"number":23,"title":"<video> element sizing behavior: support for 'object-fit' and 'overflow' styles","user":{"login":"aoberoi","id":494795,"avatar_url":"https://avatars.githubusercontent.com/u/494795?v=3","gravatar_id":"","url":"https://api.github.com/users/aoberoi","html_url":"https://github.com/aoberoi","followers_url":"https://api.github.com/users/aoberoi/followers","following_url":"https://api.github.com/users/aoberoi/following{/other_user}","gists_url":"https://api.github.com/users/aoberoi/gists{/gist_id}","starred_url":"https://api.github.com/users/aoberoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aoberoi/subscriptions","organizations_url":"https://api.github.com/users/aoberoi/orgs","repos_url":"https://api.github.com/users/aoberoi/repos","events_url":"https://api.github.com/users/aoberoi/events{/privacy}","received_events_url":"https://api.github.com/users/aoberoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-25T04:01:30Z","updated_at":"2015-06-25T11:27:47Z","closed_at":null,"body":"Right now the MediaStreamRenderer will always render video by scaling it down so that the entire frame fits within the `<video>` element (preserving aspect ratio and centering) and fills the rest of the area with black pixels. This is equivalent to the standards when the `<video>` has the default styles applied (specifically `object-fit: contain`).\r\n\r\nI'm interested in support for the `object-fit: cover` style. This behavior is different in that the video frame is scaled up to as large as it needs to grow in order to draw in all the pixels inside the video element (preserving aspect ratio and centering). There are no black pixels.\r\n\r\nWith that style alone, it actually draws video outside of the bounds of the video element. I believe a common use case is to pair this with `overflow: hidden` on the some parent in the DOM tree so that the video frame is \"cropped\" to the bounds of a certain size. I understand that implementing this in the MediaStreamRenderer would mean you would have to observe every parent of the video element up the DOM tree and that would probably be too slow. I want to suggest that we only aim to implement the correct `overflow: hidden` behavior for its direct parent."},"comment":{"url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/comments/115215284","html_url":"https://github.com/eface2face/cordova-plugin-iosrtc/issues/23#issuecomment-115215284","issue_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/23","id":115215284,"user":{"login":"ibc","id":16191,"avatar_url":"https://avatars.githubusercontent.com/u/16191?v=3","gravatar_id":"","url":"https://api.github.com/users/ibc","html_url":"https://github.com/ibc","followers_url":"https://api.github.com/users/ibc/followers","following_url":"https://api.github.com/users/ibc/following{/other_user}","gists_url":"https://api.github.com/users/ibc/gists{/gist_id}","starred_url":"https://api.github.com/users/ibc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibc/subscriptions","organizations_url":"https://api.github.com/users/ibc/orgs","repos_url":"https://api.github.com/users/ibc/repos","events_url":"https://api.github.com/users/ibc/events{/privacy}","received_events_url":"https://api.github.com/users/ibc/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T11:27:47Z","updated_at":"2015-06-25T11:27:47Z","body":"Excellent report, and a \"must have\" for the plugin. I will do my best effort on this subject next week once I get some spare time."}}