This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hello | |
| World | |
| Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const data = (html, width, height) => | |
| `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">` + | |
| '<foreignObject width="100%" height="100%">' + | |
| '<div xmlns="http://www.w3.org/1999/xhtml">' + | |
| html + | |
| '</div>' + | |
| '</foreignObject>' + | |
| '</svg>' | |
| const htmlUrl = (element, width, height) => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function partiallyApply (...args) { | |
| const func = args.shift() | |
| return (...otherArgs) => func(...args, ...otherArgs) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Looks for any properties that exist on `mixin` but not on `receivingObject` and copies adds them to | |
| * `receivingObject` | |
| * | |
| * @example | |
| * var obj1 = { | |
| * foo () {return 'foo from obj1'} | |
| * } | |
| * | |
| * var obj2 = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| window.MediaSource = window.MediaSource || window.WebKitMediaSource; | |
| function testTypes(types) { | |
| for (var i = 0; i < types.length; ++i) | |
| console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i])); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from http://www.jwplayer.com/html5/mediasource/ | |
| var haseme = document.getElementById('haseme'); | |
| window.MediaKeys = window.MediaKeys || window.MSMediaKeys || window.WebKitMediaKeys; | |
| if (!!!window.MediaKeys) { | |
| var html = 'Your browser does not support the Encrypted Media Extensions.'; | |
| } else { | |
| var html = "The Encrypted Media Extensions are available for:<br />"; | |
| html += "- W3C Clear Key: "+ MediaKeys.isTypeSupported('org.w3.clearkey').toString() + "<br />"; | |
| html += "- Microsoft playReady: "+ MediaKeys.isTypeSupported('com.microsoft.playready').toString() + "<br />"; |