Change to proper constructor + prototypes

This commit is contained in:
Sam Potts 2017-06-04 15:27:37 +10:00
parent aaab9ad082
commit 7daa08c32f
5 changed files with 1344 additions and 1183 deletions

2
demo/dist/demo.js vendored

File diff suppressed because one or more lines are too long

View File

@ -37,6 +37,10 @@
]
});
// Expose for testing
window.player = player;
// Load demo sprite
window.loadSprite('dist/demo.svg', 'demo-sprite');
// Setup type toggle

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,35 @@
- Added `playsinline` support for iOS 10
- Embed setup now accepts an <iframe> as the target element for true progressive enhancement
#### Breaking changes
## Changes
### Config changes
- videoWrapper -> video
- embedWrapper -> embed
- setup and ready classes removed
### API changes
- Can now chain most functions (need to document which can)
- support -> supports
- isFullscreen -> fullscreen.active
- new 'language'
- getType -> type
- getEmbed -> embed
- getContainer removed
- getMedia -> media
- getCurrentTime -> media.currentTime
- getVolume -> media.volume
- isMuted -> media.muted
- isLoading -> media.loading
- isPaused -> media.paused
- updatePoster -> poster
- setVolume -> volume
- increaseVolume (new)
- decreaseVolume (new)
- togglePictureInPicture (new)
- airPlay (new)
#### Other breaking changes
- New config options for loop
- Selectors changes (new `input` and `display` object) - DOCUMENT
- Custom HTML option now `controls` which accepts a string (HTML), a function (your own template engine) or array (use built in controls)

File diff suppressed because it is too large Load Diff