Open Bug 696593 Opened 10 years ago Updated 5 months ago
Video and audio controls should adjust their display based on dimensions using the onresize event
Bug 876426 added a "resizevideocontrols" event that we can use to fix this bug. The changes will need to be made in /toolkit/content/widgets/videocontrols.xml
Bug 689374 and bug 462117 are for adding specialized HTML5 audio/video controls for small-dimension media, but they rely on the size of the media when it is loaded. It will be good to add an event handler for element.onresize so that we can adjust the controls when the elements are resized (instead of just when the page loads).
It seems that |onresize| is only fired for window elements (https://developer.mozilla.org/en-US/docs/DOM/element.onresize). A polling approach could be used. Is there a better event to be used?
Isn't this exactly what CSS @media queries are for?
The implementation of element 'resize' events is at bug 227495, so that bug would need to be fixed before this one can use that approach. However, you could try Mardeg's comment about using CSS media queries.
Bug 876426 added a "resizevideocontrols" event that we can use to fix this bug. The changes will need to be made in /toolkit/content/widgets/videocontrols.xml. Owen, would you like to work on this bug as well as bug 729111?
Whiteboard: [mentor=jaws][lang=js] → [lang=js]
Assignee: owen → nobody
User Story: (updated)
Flags: needinfo?(jaws) → needinfo?(bukky.akinnadeju17)
You need to log in before you can comment on or make changes to this bug.