Adds a new PictureInPictureToggle component in the controls bar of the player. It depends on videojs-font 3.2.0 (videojs/font#41) for icons.
Final spec piece from #5824.
Following #5824, this PR adds support for some Picture-in-Picture methods described in the spec and article. It also makes sure that we can listen to the enterpictureinpicture and leavepictureinpicture events on the player.
This adds a breakpoints option. By default, this option is false meaning this is an opt-in feature.
When passing true, it will use a default set of breakpoints. Or custom breakpoints can be passed if users do not like our breakpoints (or previously-existing style decisions).
- Add breakpoints option.
- Adds some new (currently unused) classes: vjs-layout-medium, vjs-layout-large, vjs-layout-x-large, and vjs-layout-huge.
- Add updateCurrentBreakpoint and currentBreakpoint methods to the player.
- Update css/components/_adaptive.scss
- Add sandbox/responsive.html.example
Closesvideojs/video.js#4371
Use ResizeObserver when available for better and more performant resizing information, otherwise, fall back to a throttled resize event on an iframe that's the size of the player.
Allows a video.js user to disable this by setting resizeManager: false as an option since the component will not be initialized.
Add a debounce util.
This reverts #4800 (e0ed0b5) because we end up getting two playerresize events with the dimension methods now.
Use primary code ('en') if specific code ('en-us') doesn not match
Always re-merge languages
closes#2177
Updated language function to lowercase internally
Updated component.localize to not require stubbing
Preparing to export utility functions on the videojs object
closes#2182
Change el() to getEl() for consistency
Cleaned up DOM functions library
Clean up and document videojs object API
Fixed mergeOptions to modify the first object instead of a copy
More cleanup of the main video.js file and documentation
Fixed issues with mergeOptions
Cleaned up the addLanguage function
Removed unnecessary underscores in private module vars
Broke out bind, guid, and element data functions from Lib
Separated out more dom functions in to dom.js
Broke out URL functions into url.js
Removed setLocalStorage since it wasn't being used
Moved browser tests out of lib
Moved log functions into their own file
Removed trim() since it wasn't being used
Moved formatTime into its own file
Moved round into its own file and renamed roundFloat()
Moved capitalize into its own file and renamed as toTitleCase()
Moved createTimeRange into its own file
Removed Lib.arr.forEach infavor of the native forEach
Removed Lib.obj.create in favor of native Object.create (ES6-sham)
Removed obj.each in favor of native Object.getOwnPropertyNames().forEach()
Removed obj.merge and copy. Using lodash.assign instead.
Replaced Lib.obj.isPlain with lodash.isPlainObject
Removed Lib.obj.isArray in favor of the native Array.isArray
Also removed the lib.js tests file as all tests have been moved
or removed.
Removed Lib.isEmpty in favor of !Object.getOwnPropertyNames().length
Switched Util.mergeOptions and deepMerge to use new mergeOptions()
Moved Lib.TEST_VID to Html5.TEST_VID
Removed Lib references everywhere. Woo!
Attempting to fix sourcemap test errors by setting grunt-browserify version
Switched to object.assign from lodash.assign
Removed unused 'inherits' dependency
Reorganzied test files and added '.test' to file names
Combined js/core.js and js/video.js
Moved events.js into the utils directory