Merge captions setText and setCue into updateCues (fixes #998 and vimeo cuechange event)
This commit is contained in:
@@ -833,6 +833,13 @@ const utils = {
|
||||
return fragment.firstChild.innerText;
|
||||
},
|
||||
|
||||
// Like outerHTML, but also works for DocumentFragment
|
||||
getHTML(element) {
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.appendChild(element);
|
||||
return wrapper.innerHTML;
|
||||
},
|
||||
|
||||
// Get aspect ratio for dimensions
|
||||
getAspectRatio(width, height) {
|
||||
const getRatio = (w, h) => (h === 0 ? w : getRatio(h, w % h));
|
||||
|
||||
Reference in New Issue
Block a user